[cfe-commits] r97654 - /cfe/trunk/lib/Analysis/CFG.cpp

Benjamin Kramer benny.kra at googlemail.com
Wed Mar 3 08:28:47 PST 2010


Author: d0k
Date: Wed Mar  3 10:28:47 2010
New Revision: 97654

URL: http://llvm.org/viewvc/llvm-project?rev=97654&view=rev
Log:
Simplify code a bit and remove unneeded semicolons.

Modified:
    cfe/trunk/lib/Analysis/CFG.cpp

Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=97654&r1=97653&r2=97654&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Mar  3 10:28:47 2010
@@ -43,16 +43,13 @@
               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.





More information about the cfe-commits mailing list