summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-29 00:50:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-29 00:50:52 +0000
commit7b553f1b19221fceb3d90a1a010e0f59e14c2fa7 (patch)
treed4240f4fd95affd414546ca87a9294ecf9d92a43 /clang/lib/CodeGen/CGDebugInfo.cpp
parent9b9c970148907f24d1ead713ad258f864c28f93c (diff)
downloadbcm5719-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/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index b7107d5883a..920eb5578e4 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1112,7 +1112,8 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
if (const VarDecl *V = dyn_cast<VarDecl>(*I)) {
if (const Expr *Init = V->getInit()) {
Expr::EvalResult Result;
- if (Init->Evaluate(Result, CGM.getContext()) && Result.Val.isInt()) {
+ if (Init->EvaluateAsRValue(Result, CGM.getContext()) &&
+ Result.Val.isInt()) {
llvm::ConstantInt *CI
= llvm::ConstantInt::get(CGM.getLLVMContext(), Result.Val.getInt());
OpenPOWER on IntegriCloud