diff options
author | Eric Christopher <echristo@gmail.com> | 2016-09-16 07:33:15 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-09-16 07:33:15 +0000 |
commit | 4367c7fb9accecfeca579cdbae82f3c27ede6295 (patch) | |
tree | 56537e26ff5f994a95796382ea3a1707b0d9e4c2 /llvm/lib/Target/XCore | |
parent | a808f2981eef62df08151f45f239551f013ea19f (diff) | |
download | bcm5719-llvm-4367c7fb9accecfeca579cdbae82f3c27ede6295.tar.gz bcm5719-llvm-4367c7fb9accecfeca579cdbae82f3c27ede6295.zip |
Move the Mangler from the AsmPrinter down to TLOF and clean up the
TLOF API accordingly.
llvm-svn: 281708
Diffstat (limited to 'llvm/lib/Target/XCore')
-rw-r--r-- | llvm/lib/Target/XCore/XCoreAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp | 12 | ||||
-rw-r--r-- | llvm/lib/Target/XCore/XCoreTargetObjectFile.h | 2 |
3 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp index ba94ac772b8..2c1bbeddedf 100644 --- a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp +++ b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp @@ -115,8 +115,7 @@ void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { return; const DataLayout &DL = getDataLayout(); - OutStreamer->SwitchSection( - getObjFileLowering().SectionForGlobal(GV, *Mang, TM)); + OutStreamer->SwitchSection(getObjFileLowering().SectionForGlobal(GV, TM)); MCSymbol *GVSym = getSymbol(GV); const Constant *C = GV->getInitializer(); diff --git a/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp b/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp index abe1deddc56..22dcb2e6b2e 100644 --- a/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp +++ b/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp @@ -95,10 +95,8 @@ static unsigned getXCoreSectionFlags(SectionKind K, bool IsCPRel) { return Flags; } -MCSection * -XCoreTargetObjectFile::getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const { +MCSection *XCoreTargetObjectFile::getExplicitSectionGlobal( + const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const { StringRef SectionName = GV->getSection(); // Infer section flags from the section name if we can. bool IsCPRel = SectionName.startswith(".cp."); @@ -108,10 +106,8 @@ XCoreTargetObjectFile::getExplicitSectionGlobal(const GlobalValue *GV, getXCoreSectionFlags(Kind, IsCPRel)); } -MCSection * -XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const { +MCSection *XCoreTargetObjectFile::SelectSectionForGlobal( + const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const { bool UseCPRel = GV->isLocalLinkage(GV->getLinkage()); diff --git a/llvm/lib/Target/XCore/XCoreTargetObjectFile.h b/llvm/lib/Target/XCore/XCoreTargetObjectFile.h index c129d757dea..e022d84222f 100644 --- a/llvm/lib/Target/XCore/XCoreTargetObjectFile.h +++ b/llvm/lib/Target/XCore/XCoreTargetObjectFile.h @@ -26,11 +26,9 @@ static const unsigned CodeModelLargeSize = 256; void Initialize(MCContext &Ctx, const TargetMachine &TM) override; MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, const TargetMachine &TM) const override; MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, const TargetMachine &TM) const override; MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, |