summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetObjectFile.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2016-09-16 07:33:15 +0000
committerEric Christopher <echristo@gmail.com>2016-09-16 07:33:15 +0000
commit4367c7fb9accecfeca579cdbae82f3c27ede6295 (patch)
tree56537e26ff5f994a95796382ea3a1707b0d9e4c2 /llvm/lib/Target/X86/X86TargetObjectFile.cpp
parenta808f2981eef62df08151f45f239551f013ea19f (diff)
downloadbcm5719-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/X86/X86TargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetObjectFile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp
index d664cff5f2c..f0713286bcc 100644
--- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp
+++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp
@@ -24,14 +24,13 @@ using namespace llvm;
using namespace dwarf;
const MCExpr *X86_64MachoTargetObjectFile::getTTypeGlobalReference(
- const GlobalValue *GV, unsigned Encoding, Mangler &Mang,
- const TargetMachine &TM, MachineModuleInfo *MMI,
- MCStreamer &Streamer) const {
+ const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
+ MachineModuleInfo *MMI, MCStreamer &Streamer) const {
// On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which
// is an indirect pc-relative reference.
if ((Encoding & DW_EH_PE_indirect) && (Encoding & DW_EH_PE_pcrel)) {
- const MCSymbol *Sym = TM.getSymbol(GV, Mang);
+ const MCSymbol *Sym = TM.getSymbol(GV, getMangler());
const MCExpr *Res =
MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext());
const MCExpr *Four = MCConstantExpr::create(4, getContext());
@@ -39,13 +38,13 @@ const MCExpr *X86_64MachoTargetObjectFile::getTTypeGlobalReference(
}
return TargetLoweringObjectFileMachO::getTTypeGlobalReference(
- GV, Encoding, Mang, TM, MMI, Streamer);
+ GV, Encoding, TM, MMI, Streamer);
}
MCSymbol *X86_64MachoTargetObjectFile::getCFIPersonalitySymbol(
- const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM,
+ const GlobalValue *GV, const TargetMachine &TM,
MachineModuleInfo *MMI) const {
- return TM.getSymbol(GV, Mang);
+ return TM.getSymbol(GV, getMangler());
}
const MCExpr *X86_64MachoTargetObjectFile::getIndirectSymViaGOTPCRel(
@@ -74,7 +73,7 @@ X86LinuxNaClTargetObjectFile::Initialize(MCContext &Ctx,
}
const MCExpr *X86WindowsTargetObjectFile::lowerRelativeReference(
- const GlobalValue *LHS, const GlobalValue *RHS, Mangler &Mang,
+ const GlobalValue *LHS, const GlobalValue *RHS,
const TargetMachine &TM) const {
// Our symbols should exist in address space zero, cowardly no-op if
// otherwise.
@@ -95,8 +94,9 @@ const MCExpr *X86WindowsTargetObjectFile::lowerRelativeReference(
cast<GlobalVariable>(RHS)->hasInitializer() || RHS->hasSection())
return nullptr;
- return MCSymbolRefExpr::create(
- TM.getSymbol(LHS, Mang), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
+ return MCSymbolRefExpr::create(TM.getSymbol(LHS, getMangler()),
+ MCSymbolRefExpr::VK_COFF_IMGREL32,
+ getContext());
}
static std::string APIntToHexString(const APInt &AI) {
OpenPOWER on IntegriCloud