diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a652ede1c1f..eeaa197cf3b 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -320,8 +320,7 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, FieldSize = M->getContext().getTypeSize(FType); Expr *BitWidth = Field->getBitWidth(); if (BitWidth) - FieldSize = - BitWidth->getIntegerConstantExprValue(M->getContext()).getZExtValue(); + FieldSize = BitWidth->EvaluateAsInt(M->getContext()).getZExtValue(); FieldAlign = M->getContext().getTypeAlign(FType); } @@ -432,9 +431,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, FieldSize = M->getContext().getTypeSize(FType); Expr *BitWidth = Field->getBitWidth(); if (BitWidth) - FieldSize = - BitWidth->getIntegerConstantExprValue(M->getContext()).getZExtValue(); - + FieldSize = BitWidth->EvaluateAsInt(M->getContext()).getZExtValue(); + FieldAlign = M->getContext().getTypeAlign(FType); } |