if (isa<GlobalVariable>(GV)) {
const TargetData *TD = TM.getTargetData();
- unsigned Size = TD->getTypePaddedSize(GV->getType()->getElementType());
+ unsigned Size = TD->getTypeAllocSize(GV->getType()->getElementType());
unsigned Threshold = Subtarget->getSSectionThreshold();
if (Size > 0 && Size <= Threshold) {
SectionKind::Kind K = SectionKindForGlobal(GV);
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
- if (GVA && (!GVA->mayBeOverridden()))
+ if (GVA && (!GVA->isWeakForLinker()))
switch (K) {
case SectionKind::SmallData:
return getSmallDataSection();