summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
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