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 | 6ee7aa154e8bbb21a21254293410b944f78b0bfe (patch) | |
tree | 1c72e4ab41df953f8e3a89b34b162b3183ff12f8 /lib/AST/ExprConstant.cpp | |
parent | 9ad16aebc0e840a5e7d425da72eb6cbe25e4b58c (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/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 86f7a2181e..625a414aa9 100644 --- a/lib/AST/ExprConstant.cpp +++ b/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); } |