diff options
author | Daniel Jasper <djasper@google.com> | 2014-02-19 12:26:01 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-02-19 12:26:01 +0000 |
commit | 7e198ad862cddf373edcb51801a9800c4637d52e (patch) | |
tree | 7a97a155d36e3ccc331ec56d3e18a7eefae5c408 /llvm/lib/Target/X86/X86TargetObjectFile.cpp | |
parent | d495642c5410f11345c03fcaa35fd346ad9ab207 (diff) | |
download | llvm-7e198ad862cddf373edcb51801a9800c4637d52e.zip llvm-7e198ad862cddf373edcb51801a9800c4637d52e.tar.gz llvm-7e198ad862cddf373edcb51801a9800c4637d52e.tar.bz2 |
Revert r201622 and r201608.
This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.
llvm-svn: 201669
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetObjectFile.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp index 95fccba..c5ba3ec 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp +++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp @@ -14,20 +14,18 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/Support/Dwarf.h" -#include "llvm/Target/TargetLowering.h" 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 { + 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 | DW_EH_PE_pcrel)) { - const MCSymbol *Sym = TM.getTargetLowering()->getSymbol(GV, Mang); + const MCSymbol *Sym = getSymbol(GV, Mang); const MCExpr *Res = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext()); const MCExpr *Four = MCConstantExpr::Create(4, getContext()); @@ -35,13 +33,13 @@ const MCExpr *X86_64MachoTargetObjectFile::getTTypeGlobalReference( } return TargetLoweringObjectFileMachO::getTTypeGlobalReference( - GV, Encoding, Mang, TM, MMI, Streamer); + GV, Encoding, Mang, MMI, Streamer); } -MCSymbol *X86_64MachoTargetObjectFile::getCFIPersonalitySymbol( - const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI) const { - return TM.getTargetLowering()->getSymbol(GV, Mang); +MCSymbol *X86_64MachoTargetObjectFile:: +getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, + MachineModuleInfo *MMI) const { + return getSymbol(GV, Mang); } void @@ -56,8 +54,9 @@ X86LinuxTargetObjectFile::getDebugThreadLocalSymbol( return MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_DTPOFF, getContext()); } -const MCExpr *X86WindowsTargetObjectFile::getExecutableRelativeSymbol( - const ConstantExpr *CE, Mangler &Mang, const TargetMachine &TM) const { +const MCExpr * +X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE, + Mangler &Mang) const { // We are looking for the difference of two symbols, need a subtraction // operation. const SubOperator *Sub = dyn_cast<SubOperator>(CE); @@ -102,7 +101,6 @@ const MCExpr *X86WindowsTargetObjectFile::getExecutableRelativeSymbol( if (GVLHS->isThreadLocal()) return 0; - return MCSymbolRefExpr::Create(TM.getTargetLowering()->getSymbol(GVLHS, Mang), - MCSymbolRefExpr::VK_COFF_IMGREL32, - getContext()); + return MCSymbolRefExpr::Create( + getSymbol(GVLHS, Mang), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext()); } |