Move the Mangler from the AsmPrinter down to TLOF and clean up the
TLOF API accordingly.
llvm-svn: 281708
diff --git a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
index 82b437e..da758d3 100644
--- a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
@@ -100,10 +100,8 @@
ELF::SHF_HEX_GPREL);
}
-
MCSection *HexagonTargetObjectFile::SelectSectionForGlobal(
- const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
- const TargetMachine &TM) const {
+ const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const {
TRACE("[SelectSectionForGlobal] GV(" << GV->getName() << ") ");
TRACE("input section(" << GV->getSection() << ") ");
@@ -118,7 +116,7 @@
<< (Kind.isBSSLocal() ? "kind_bss_local " : "" ));
if (isGlobalInSmallSection(GV, TM))
- return selectSmallSectionForGlobal(GV, Kind, Mang, TM);
+ return selectSmallSectionForGlobal(GV, Kind, TM);
if (Kind.isCommon()) {
// This is purely for LTO+Linker Script because commons don't really have a
@@ -130,14 +128,11 @@
TRACE("default_ELF_section\n");
// Otherwise, we work the same as ELF.
- return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind,
- Mang, TM);
+ return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, TM);
}
-
MCSection *HexagonTargetObjectFile::getExplicitSectionGlobal(
- const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
- const TargetMachine &TM) const {
+ const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const {
TRACE("[getExplicitSectionGlobal] GV(" << GV->getName() << ") from("
<< GV->getSection() << ") ");
TRACE((GV->hasPrivateLinkage() ? "private_linkage " : "")
@@ -161,12 +156,11 @@
}
if (isGlobalInSmallSection(GV, TM))
- return selectSmallSectionForGlobal(GV, Kind, Mang, TM);
+ return selectSmallSectionForGlobal(GV, Kind, TM);
// Otherwise, we work the same as ELF.
TRACE("default_ELF_section\n");
- return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GV, Kind,
- Mang, TM);
+ return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GV, Kind, TM);
}
@@ -302,10 +296,8 @@
return 0;
}
-
MCSection *HexagonTargetObjectFile::selectSmallSectionForGlobal(
- const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
- const TargetMachine &TM) const {
+ const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const {
const Type *GTy = GV->getType()->getElementType();
unsigned Size = getSmallestAddressableSize(GTy, GV, TM);
@@ -386,6 +378,5 @@
TRACE("default ELF section\n");
// Otherwise, we work the same as ELF.
- return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind,
- Mang, TM);
+ return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, TM);
}