mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -927,11 +927,6 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
StringRef COMDATSymName = Sym->getName();
|
||||
return getContext().getCOFFSection(Name, Characteristics, Kind,
|
||||
COMDATSymName, Selection);
|
||||
} else {
|
||||
SmallString<256> TmpData;
|
||||
getNameWithPrefix(TmpData, GV, true, Mang, TM);
|
||||
return getContext().getCOFFSection(Name, Characteristics, Kind, TmpData,
|
||||
Selection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -953,25 +948,6 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
return DataSection;
|
||||
}
|
||||
|
||||
void TargetLoweringObjectFileCOFF::getNameWithPrefix(
|
||||
SmallVectorImpl<char> &OutName, const GlobalValue *GV,
|
||||
bool CannotUsePrivateLabel, Mangler &Mang, const TargetMachine &TM) const {
|
||||
if (GV->hasPrivateLinkage() &&
|
||||
((isa<Function>(GV) && TM.getFunctionSections()) ||
|
||||
(isa<GlobalVariable>(GV) && TM.getDataSections()))) {
|
||||
SmallString<256> Tmp;
|
||||
Mang.getNameWithPrefix(Tmp, GV, /*CannotUsePrivateLabel=*/false);
|
||||
if (Tmp.startswith(".L"))
|
||||
OutName.append(Tmp.begin() + 2, Tmp.end());
|
||||
else if (Tmp.startswith("L"))
|
||||
OutName.append(Tmp.begin() + 1, Tmp.end());
|
||||
else
|
||||
OutName.append(Tmp.begin(), Tmp.end());
|
||||
return;
|
||||
}
|
||||
Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel);
|
||||
}
|
||||
|
||||
const MCSection *TargetLoweringObjectFileCOFF::getSectionForJumpTable(
|
||||
const Function &F, Mangler &Mang, const TargetMachine &TM) const {
|
||||
// If the function can be removed, produce a unique section so that
|
||||
|
Reference in New Issue
Block a user