aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-16 21:24:15 +0000
committerChris Lattner <sabre@nondot.org>2008-11-16 21:24:15 +0000
commit6ee7aa154e8bbb21a21254293410b944f78b0bfe (patch)
tree1c72e4ab41df953f8e3a89b34b162b3183ff12f8 /lib/CodeGen
parent9ad16aebc0e840a5e7d425da72eb6cbe25e4b58c (diff)
rename Expr::tryEvaluate to Expr::Evaluate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp2
-rw-r--r--lib/CodeGen/CGExprConstant.cpp4
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 98e70e892d..a8eb8f794b 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/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/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 7b33fdbe8e..41379b5b4a 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/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/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index e6deaa7475..ff05f6e585 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/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))