summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitec3f0944890dc4ce430cc4d63fda2ee14bbc7433 (patch)
tree8661f00eeda38a2994bdc012fb71da167e2ecac3 /llvm/lib/ExecutionEngine
parent18cf7ebcee1c81f5325d3c7b1af94108e0462515 (diff)
downloadbcm5719-llvm-ec3f0944890dc4ce430cc4d63fda2ee14bbc7433.tar.gz
bcm5719-llvm-ec3f0944890dc4ce430cc4d63fda2ee14bbc7433.zip
Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized. llvm-svn: 20258
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 7f6a89ed485..85ce67b9a9c 100644
--- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud