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 | c2c90011a688c04a4e980282f08c267e081c4b00 (patch) | |
tree | f543ec6056c1b38c7b6bc1ae2fb4b4b1090734e1 /lib/CodeGen/CodeGenFunction.h | |
parent | a02411e4d58b1730bea2a990822858ecc31e8eb1 (diff) |
Change the interface to ConstantFoldsToSimpleInteger to not encode
a bool + success into one tri-state integer, simplifying things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index be646fb290..7a94b92fbb 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/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 |