Simplify code a bit and remove unneeded semicolons.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-03-03 16:28:47 +00:00
Родитель fb17a56213
Коммит 792bea97c4
1 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -43,16 +43,13 @@ public:
AsLValueNotAlwaysAdd = 2,
AlwaysAddAsLValue = 3 };
public:
AddStmtChoice(Kind k)
: AsLValue(k >= AlwaysAddAsLValue), AlwaysAddStmt((unsigned)k & 0x1) {}
AddStmtChoice(Kind kind) : k(kind) {}
bool alwaysAdd() const { return (bool) AlwaysAddStmt; };
bool asLValue() const { return (bool) AsLValue; };
bool alwaysAdd() const { return (unsigned)k & 0x1; }
bool asLValue() const { return k >= AlwaysAddAsLValue; }
private:
unsigned AsLValue : 1;
unsigned AlwaysAddStmt : 1;
Kind k;
};
/// CFGBuilder - This class implements CFG construction from an AST.