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/AST | |
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/AST')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 871dc4bb77a..29d9a11de78 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -798,7 +798,7 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, // reject it. if (CE->isBuiltinCall()) { APValue ResultAP; - if (CE->tryEvaluate(ResultAP, Ctx)) { + if (CE->Evaluate(ResultAP, Ctx)) { Result = ResultAP.getInt(); break; // It is a constant, expand it. } diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 86f7a2181e0..625a414aa9d 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -508,7 +508,7 @@ bool IntExprEvaluator::VisitCallExpr(const CallExpr *E) { // __builtin_constant_p always has one operand: it returns true if that // operand can be folded, false otherwise. APValue Res; - Result = E->getArg(0)->tryEvaluate(Res, Info.Ctx); + Result = E->getArg(0)->Evaluate(Res, Info.Ctx); return true; } } @@ -1094,14 +1094,14 @@ static bool EvaluateComplexFloat(const Expr *E, APValue &Result, EvalInfo &Info) } //===----------------------------------------------------------------------===// -// Top level TryEvaluate. +// Top level Expr::Evaluate method. //===----------------------------------------------------------------------===// -/// tryEvaluate - Return true if this is a constant which we can fold using +/// Evaluate - Return true if this is a constant which we can fold using /// any crazy technique (that has nothing to do with language standards) that /// we want to. If this function returns true, it returns the folded constant /// in Result. -bool Expr::tryEvaluate(APValue &Result, ASTContext &Ctx) const { +bool Expr::Evaluate(APValue &Result, ASTContext &Ctx) const { EvalInfo Info(Ctx); if (getType()->isIntegerType()) { llvm::APSInt sInt(32); @@ -1127,9 +1127,9 @@ bool Expr::tryEvaluate(APValue &Result, ASTContext &Ctx) const { return false; } -/// isEvaluatable - Call tryEvaluate to see if this expression can be constant +/// isEvaluatable - Call Evaluate to see if this expression can be constant /// folded, but discard the result. bool Expr::isEvaluatable(ASTContext &Ctx) const { APValue V; - return tryEvaluate(V, Ctx); + return Evaluate(V, Ctx); } |