Mangler *Mang) const {
if (GV==0)
return false;
- if (GV->hasInternalLinkage() && !isa<Function>(GV) &&
+ if (GV->hasLocalLinkage() && !isa<Function>(GV) &&
((strlen(getPrivateGlobalPrefix()) != 0 &&
Mang->getValueName(GV).substr(0,strlen(getPrivateGlobalPrefix())) ==
getPrivateGlobalPrefix()) ||
DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const {
const TargetData *TD = TM.getTargetData();
Constant *C = cast<GlobalVariable>(GV)->getInitializer();
- const Type *Type = cast<ConstantArray>(C)->getType()->getElementType();
+ const Type *Ty = cast<ArrayType>(C->getType())->getElementType();
- unsigned Size = TD->getABITypeSize(Type);
+ unsigned Size = TD->getTypePaddedSize(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->getABITypeSize(Ty);
+ unsigned Size = TD->getTypePaddedSize(Ty);
if (Size == 4)
return FourByteConstantSection;
else if (Size == 8)