summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-12-12 05:58:14 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-12-12 05:58:14 +0000
commit5cc966a6c1258e007d90dd0b92a8c146087de9a9 (patch)
tree2a42d363785f1f60f16857c67b5be8d011df3685 /lib/ExecutionEngine
parent66b856683fb67796aa77e52d676c4739e8e47d6d (diff)
downloadllvm-5cc966a6c1258e007d90dd0b92a8c146087de9a9.tar.gz
llvm-5cc966a6c1258e007d90dd0b92a8c146087de9a9.tar.bz2
llvm-5cc966a6c1258e007d90dd0b92a8c146087de9a9.tar.xz
Fix available_externally linkage for globals. It's probably still not
supported by emitGlobals, but I don't have a test case for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 6d781c7e22..3607f1fcb0 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -681,7 +681,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
if (Ptr) return Ptr;
// If the global is external, just remember the address.
- if (GV->isDeclaration()) {
+ if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) {
#if HAVE___DSO_HANDLE
if (GV->getName() == "__dso_handle")
return (void*)&__dso_handle;