summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp24
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp6
-rw-r--r--llvm/lib/Target/TargetMachine.cpp2
3 files changed, 1 insertions, 31 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
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 75100fb9923..faa6fbe6075 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -343,9 +343,3 @@ const MCExpr *TargetLoweringObjectFile::getDebugThreadLocalSymbol(const MCSymbol
// null return could mean 'no location' & we should just do that here.
return MCSymbolRefExpr::Create(Sym, *Ctx);
}
-
-void TargetLoweringObjectFile::getNameWithPrefix(
- SmallVectorImpl<char> &OutName, const GlobalValue *GV,
- bool CannotUsePrivateLabel, Mangler &Mang, const TargetMachine &TM) const {
- Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel);
-}
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 56e7e8b24bd..bc2af5e9ad6 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -175,7 +175,7 @@ void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name,
const TargetLoweringObjectFile *TLOF = getObjFileLowering();
const MCSection *TheSection = TLOF->SectionForGlobal(GV, GVKind, Mang, *this);
bool CannotUsePrivateLabel = !canUsePrivateLabel(*AsmInfo, *TheSection);
- TLOF->getNameWithPrefix(Name, GV, CannotUsePrivateLabel, Mang, *this);
+ Mang.getNameWithPrefix(Name, GV, CannotUsePrivateLabel);
}
MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV, Mangler &Mang) const {
OpenPOWER on IntegriCloud