Constant *C = cast<GlobalVariable>(GV)->getInitializer();
const Type *Type = cast<ConstantArray>(C)->getType()->getElementType();
- unsigned Size = TD->getABITypeSize(Type);
+ unsigned Size = TD->getTypePaddedSize(Type);
if (Size) {
unsigned Align = TD->getPreferredAlignment(GV);
if (Align <= 32)
DarwinTargetAsmInfo::MergeableConstSection(const Type *Ty) const {
const TargetData *TD = TM.getTargetData();
- unsigned Size = TD->getABITypeSize(Ty);
+ unsigned Size = TD->getTypePaddedSize(Ty);
if (Size == 4)
return FourByteConstantSection;
else if (Size == 8)