X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FDarwinTargetAsmInfo.cpp;h=cc05c09c5170a1b401706e4317e49f11410b98de;hb=0a0e68a7eac0513505aff3079e2d5d6864e51895;hp=cb73d31d4bd3af5d59fc37d386c471648fa2bd6d;hpb=8f092252d3fe75064abe330e0e6f75e213f4ac06;p=oota-llvm.git diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index cb73d31d4bd..cc05c09c517 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -61,7 +61,7 @@ DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV, Mangler *Mang) const { if (GV==0) return false; - if (GV->hasInternalLinkage() && !isa(GV) && + if (GV->hasLocalLinkage() && !isa(GV) && ((strlen(getPrivateGlobalPrefix()) != 0 && Mang->getValueName(GV).substr(0,strlen(getPrivateGlobalPrefix())) == getPrivateGlobalPrefix()) || @@ -108,15 +108,16 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { } // FIXME: Do we have any extra special weird cases? + return NULL; } const Section* DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const { const TargetData *TD = TM.getTargetData(); Constant *C = cast(GV)->getInitializer(); - const Type *Type = cast(C)->getType()->getElementType(); + const Type *Ty = cast(C->getType())->getElementType(); - unsigned Size = TD->getABITypeSize(Type); + unsigned Size = TD->getTypePaddedSize(Ty); if (Size) { unsigned Align = TD->getPreferredAlignment(GV); if (Align <= 32) @@ -137,7 +138,7 @@ inline const Section* 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)