diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
commit | 51f4708c00110940ca3f337961915f2ca1668375 (patch) | |
tree | 8507a7dfb0f17042f2373b7fa309b00967283c2c /lib/CodeGen/CGExprConstant.cpp | |
parent | 7800212ef29be314d55814e8dcc568ff8beed106 (diff) |
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 31e0f2c3b0..0622c10165 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -957,7 +957,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, if (DestType->isReferenceType()) Success = E->EvaluateAsLValue(Result, Context); else - Success = E->Evaluate(Result, Context); + Success = E->EvaluateAsRValue(Result, Context); if (Success && !Result.HasSideEffects) { switch (Result.Val.getKind()) { |