diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 88f7dcebd24..dbceaa7aa86 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2523,9 +2523,9 @@ llvm::DIType *CGDebugInfo::CreateType(const ArrayType *Ty, llvm::DIFile *Unit) { Count = CAT->getSize().getZExtValue(); else if (const auto *VAT = dyn_cast<VariableArrayType>(Ty)) { if (Expr *Size = VAT->getSizeExpr()) { - llvm::APSInt V; - if (Size->EvaluateAsInt(V, CGM.getContext())) - Count = V.getExtValue(); + Expr::EvalResult Result; + if (Size->EvaluateAsInt(Result, CGM.getContext())) + Count = Result.Val.getInt().getExtValue(); } } |