aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index faab3cfe10..ae3c267190 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -3085,7 +3085,7 @@ void CGObjCCommonMac::BuildAggrIvarLayout(const ObjCInterfaceDecl *OI,
LastFieldBitfield);
Expr *BitWidth = LastFieldBitfield->getBitWidth();
uint64_t BitFieldSize =
- BitWidth->getIntegerConstantExprValue(CGM.getContext()).getZExtValue();
+ BitWidth->EvaluateAsInt(CGM.getContext()).getZExtValue();
skivar.ivar_size = (BitFieldSize / ByteSizeInBits)
+ ((BitFieldSize % ByteSizeInBits) != 0);
SkipIvars.push_back(skivar);
@@ -4293,7 +4293,7 @@ void CGObjCNonFragileABIMac::GetClassSizeInfo(const ObjCInterfaceDecl *OID,
if (Last->isBitField()) {
Expr *BitWidth = Last->getBitWidth();
uint64_t BitFieldSize =
- BitWidth->getIntegerConstantExprValue(CGM.getContext()).getZExtValue();
+ BitWidth->EvaluateAsInt(CGM.getContext()).getZExtValue();
Size = (BitFieldSize / 8) + ((BitFieldSize % 8) != 0);
}
#endif