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 | 7b553f1b19221fceb3d90a1a010e0f59e14c2fa7 (patch) | |
| tree | d4240f4fd95affd414546ca87a9294ecf9d92a43 /clang/lib/CodeGen/CGExprConstant.cpp | |
| parent | 9b9c970148907f24d1ead713ad258f864c28f93c (diff) | |
| download | bcm5719-llvm-7b553f1b19221fceb3d90a1a010e0f59e14c2fa7.tar.gz bcm5719-llvm-7b553f1b19221fceb3d90a1a010e0f59e14c2fa7.zip | |
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.
llvm-svn: 143263
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 31e0f2c3b0e..0622c101651 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/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()) { |

