[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp

Chris Lattner lattner at persephone.cs.uiuc.edu
Sun Feb 20 10:44:03 PST 2005



Changes in directory llvm/lib/ExecutionEngine/JIT:

JITEmitter.cpp updated: 1.62 -> 1.63
---
Log message:

Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized.


---
Diffs of the changes:  (+2 -2)

 JITEmitter.cpp |    4 ++--
 1 files changed, 2 insertions, 2 deletions


Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.62 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.63
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.62	Mon Jan 10 12:23:22 2005
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp	Sun Feb 20 12:43:35 2005
@@ -180,14 +180,14 @@
   // 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.






More information about the llvm-commits mailing list