Add back r201608, r201622, r201624 and r201625
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Feb 2014 17:23:20 +0000 (17:23 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Feb 2014 17:23:20 +0000 (17:23 +0000)
commit737c9f6005594898eed4746cd310cd161ef209c6
tree2990b943f1db8362282b23b6c1d01019f24dd96f
parentcf42174647af5265e35f0e15fbffa17445ae0e80
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
35 files changed:
examples/ExceptionDemo/ExceptionDemo.cpp
include/llvm/CodeGen/AsmPrinter.h
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
include/llvm/IR/Mangler.h
include/llvm/Target/TargetLowering.h
include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
lib/CodeGen/AsmPrinter/Win64Exception.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/ExecutionEngine/MCJIT/MCJIT.cpp
lib/IR/Mangler.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/LTOModule.cpp
lib/Target/ARM/ARMTargetObjectFile.cpp
lib/Target/ARM/ARMTargetObjectFile.h
lib/Target/PowerPC/PPCMCInstLower.cpp
lib/Target/Sparc/SparcTargetObjectFile.cpp
lib/Target/Sparc/SparcTargetObjectFile.h
lib/Target/TargetLoweringObjectFile.cpp
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86TargetObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.h
lib/Target/XCore/XCoreTargetObjectFile.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/CodeGen/PowerPC/private.ll
test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll
test/CodeGen/X86/global-sections.ll
test/CodeGen/X86/osx-private-labels.ll [new file with mode: 0644]
test/CodeGen/X86/pr10420.ll
test/CodeGen/X86/private-2.ll
test/Instrumentation/AddressSanitizer/instrument_global.ll
test/LTO/private-symbol.ll [new file with mode: 0644]