aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index a652ede1c1..eeaa197cf3 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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);
}