diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-17 20:41:11 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-17 20:41:11 +0000 |
commit | 63b1d999434703e34aba06c2d1d3bf9ef83c4cbe (patch) | |
tree | 354afb7d5736c501ad0217ed1a18a77d8624ed97 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | cced8bee524d13cfedd63a3834490e6f855331a6 (diff) | |
download | bcm5719-llvm-63b1d999434703e34aba06c2d1d3bf9ef83c4cbe.tar.gz bcm5719-llvm-63b1d999434703e34aba06c2d1d3bf9ef83c4cbe.zip |
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently.
llvm-svn: 232543
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 5a8367eea77..725b8246a35 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -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 |