summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetObjectFile.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-19 17:23:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-19 17:23:20 +0000
commit737c9f6005594898eed4746cd310cd161ef209c6 (patch)
tree2990b943f1db8362282b23b6c1d01019f24dd96f /lib/Target/X86/X86TargetObjectFile.h
parentcf42174647af5265e35f0e15fbffa17445ae0e80 (diff)
downloadllvm-737c9f6005594898eed4746cd310cd161ef209c6.tar.gz
llvm-737c9f6005594898eed4746cd310cd161ef209c6.tar.bz2
llvm-737c9f6005594898eed4746cd310cd161ef209c6.tar.xz
Add back r201608, r201622, r201624 and r201625
r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetObjectFile.h')
-rw-r--r--lib/Target/X86/X86TargetObjectFile.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h
index 45739475f8..22f3e572d9 100644
--- a/lib/Target/X86/X86TargetObjectFile.h
+++ b/lib/Target/X86/X86TargetObjectFile.h
@@ -20,15 +20,16 @@ namespace llvm {
/// x86-64.
class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
public:
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
- unsigned Encoding, Mangler &Mang,
- MachineModuleInfo *MMI,
- MCStreamer &Streamer) const
+ const MCExpr *
+ getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
+ Mangler &Mang, const TargetMachine &TM,
+ MachineModuleInfo *MMI, MCStreamer &Streamer) const
LLVM_OVERRIDE;
// getCFIPersonalitySymbol - The symbol that gets passed to
// .cfi_personality.
MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
+ const TargetMachine &TM,
MachineModuleInfo *MMI) const
LLVM_OVERRIDE;
};
@@ -46,7 +47,8 @@ namespace llvm {
/// \brief This implementation is used for Windows targets on x86 and x86-64.
class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE,
- Mangler &Mang) const
+ Mangler &Mang,
+ const TargetMachine &TM) const
LLVM_OVERRIDE;
};