aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-25 23:06:42 +0000
committerChris Lattner <sabre@nondot.org>2009-10-25 23:06:42 +0000
commit79cdc2ecda3b93508190ffef80f49565093260d3 (patch)
treee9fa0736965ecc2f384baed7dbdcd0bcdc4beca2 /lib
parent4f13bfcd9890009dcab9454992134c486fc8a126 (diff)
downloadexternal_llvm-79cdc2ecda3b93508190ffef80f49565093260d3.zip
external_llvm-79cdc2ecda3b93508190ffef80f49565093260d3.tar.gz
external_llvm-79cdc2ecda3b93508190ffef80f49565093260d3.tar.bz2
fix PR5186: the JIT shouldn't try to codegen available_externally
functions it should just look them up like declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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 b2a268b..cb82590 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -659,7 +659,7 @@ void *JIT::getPointerToFunction(Function *F) {
return Addr;
}
- if (F->isDeclaration()) {
+ if (F->isDeclaration() || F->hasAvailableExternallyLinkage()) {
bool AbortOnFailure =
!areDlsymStubsEnabled() && !F->hasExternalWeakLinkage();
void *Addr = getPointerToNamedFunction(F->getName(), AbortOnFailure);