diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-27 23:02:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-27 23:02:32 +0000 |
commit | 41c6ab538ab6ff6c71164d9c2be8200c46096838 (patch) | |
tree | 58f20a82508bee8c7f0f9080936d2b1b41e21478 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 2ca62f910d07f9ca45b6d49e2a6ac231f7d08aba (diff) | |
download | bcm5719-llvm-41c6ab538ab6ff6c71164d9c2be8200c46096838.tar.gz bcm5719-llvm-41c6ab538ab6ff6c71164d9c2be8200c46096838.zip |
Change the interface to ConstantFoldsToSimpleInteger to not encode
a bool + success into one tri-state integer, simplifying things.
llvm-svn: 126592
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index be646fb2902..7a94b92fbbe 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2045,10 +2045,9 @@ public: static bool ContainsLabel(const Stmt *S, bool IgnoreCaseStmts = false); /// ConstantFoldsToSimpleInteger - If the specified expression does not fold - /// to a constant, or if it does but contains a label, return 0. If it - /// constant folds to 'true' and does not contain a label, return 1, if it - /// constant folds to 'false' and does not contain a label, return -1. - int ConstantFoldsToSimpleInteger(const Expr *Cond); + /// to a constant, or if it does but contains a label, return false. If it + /// constant folds return true and set the boolean result in Result. + bool ConstantFoldsToSimpleInteger(const Expr *Cond, bool &Result); /// EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g. for an /// if statement) to the specified blocks. Based on the condition, this might |