diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-19 17:23:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-19 17:23:20 +0000 |
commit | daeafb4c2ae969cefc54cd04bf4b114003740b00 (patch) | |
tree | 5421c03f3a0f79ce55911161d3d0061a2cd94ec2 /llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | |
parent | f0f210052f8ea8c9a126edeec46eaffbaa735983 (diff) | |
download | bcm5719-llvm-daeafb4c2ae969cefc54cd04bf4b114003740b00.tar.gz bcm5719-llvm-daeafb4c2ae969cefc54cd04bf4b114003740b00.zip |
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.
llvm-svn: 201700
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 4eaeb7a1d5c..4d5723a7a13 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -27,6 +27,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MutexGuard.h" +#include "llvm/Target/TargetLowering.h" using namespace llvm; @@ -371,7 +372,7 @@ void *MCJIT::getPointerToFunction(Function *F) { // load address of the symbol, not the local address. Mangler Mang(TM->getDataLayout()); SmallString<128> Name; - Mang.getNameWithPrefix(Name, F); + TM->getTargetLowering()->getNameWithPrefix(Name, F, Mang); return (void*)Dyld.getSymbolLoadAddress(Name); } |