aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-20 18:43:35 +0000
committerChris Lattner <sabre@nondot.org>2005-02-20 18:43:35 +0000
commit6943570f3a1cbb771f92601d3bbcf9abddeceb5e (patch)
treefbbab515a65de5e4c0fd70caa91e1ea7bd0a010f /lib/ExecutionEngine
parent45a1b26caa5212fcfa6c56518c883d10f5a4378c (diff)
downloadexternal_llvm-6943570f3a1cbb771f92601d3bbcf9abddeceb5e.zip
external_llvm-6943570f3a1cbb771f92601d3bbcf9abddeceb5e.tar.gz
external_llvm-6943570f3a1cbb771f92601d3bbcf9abddeceb5e.tar.bz2
Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 7f6a89e..85ce67b 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -180,14 +180,14 @@ void *JITResolver::getFunctionStub(Function *F) {
// Call the lazy resolver function unless we already KNOW it is an external
// function, in which case we just skip the lazy resolution step.
void *Actual = (void*)LazyResolverFn;
- if (F->hasExternalLinkage())
+ if (F->isExternal() && F->hasExternalLinkage())
Actual = TheJIT->getPointerToFunction(F);
// Otherwise, codegen a new stub. For now, the stub will call the lazy
// resolver function.
Stub = TheJIT->getJITInfo().emitFunctionStub(Actual, MCE);
- if (F->hasExternalLinkage()) {
+ if (Actual != (void*)LazyResolverFn) {
// If we are getting the stub for an external function, we really want the
// address of the stub in the GlobalAddressMap for the JIT, not the address
// of the external function.