diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-16 21:24:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-16 21:24:15 +0000 |
commit | 67d7b9204ca71aa387665d772a7d3e4db6f4f7f3 (patch) | |
tree | 2e3fe1790f648a166e3905cd6734f648963273e0 /clang/lib/CodeGen | |
parent | 537969c23720bb075a053e78b66e38283ff2bf5a (diff) | |
download | bcm5719-llvm-67d7b9204ca71aa387665d772a7d3e4db6f4f7f3.tar.gz bcm5719-llvm-67d7b9204ca71aa387665d772a7d3e4db6f4f7f3.zip |
rename Expr::tryEvaluate to Expr::Evaluate.
llvm-svn: 59426
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 98e70e892d3..a8eb8f794b7 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -39,7 +39,7 @@ static RValue EmitBinaryAtomic(CodeGenFunction& CFG, RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { // See if we can constant fold this builtin. If so, don't emit it at all. APValue Result; - if (E->tryEvaluate(Result, CGM.getContext())) { + if (E->Evaluate(Result, CGM.getContext())) { if (Result.isInt()) return RValue::get(llvm::ConstantInt::get(Result.getInt())); assert(Result.isFloat() && "Unsupported constant type"); diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 7b33fdbe8ec..41379b5b4a4 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -610,7 +610,7 @@ public: llvm::Constant *VisitCallExpr(const CallExpr *E) { APValue Result; - if (E->tryEvaluate(Result, CGM.getContext())) { + if (E->Evaluate(Result, CGM.getContext())) { if (Result.isInt()) return llvm::ConstantInt::get(Result.getInt()); if (Result.isFloat()) @@ -845,7 +845,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, #ifdef USE_TRY_EVALUATE APValue V; - if (E->tryEvaluate(V, Context)) { + if (E->Evaluate(V, Context)) { // FIXME: Assert that the value doesn't have any side effects. switch (V.getKind()) { default: assert(0 && "unhandled value kind!"); diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index e6deaa7475b..ff05f6e5855 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -197,7 +197,7 @@ int CodeGenFunction::ConstantFoldsToSimpleInteger(const Expr *Cond) { // FIXME: Rename and handle conversion of other evaluatable things // to bool. - if (!Cond->tryEvaluate(V, getContext()) || !V.isInt()) + if (!Cond->Evaluate(V, getContext()) || !V.isInt()) return 0; // Not foldable or not integer. if (CodeGenFunction::ContainsLabel(Cond)) |