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