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

Chris Lattner lattner at cs.uiuc.edu
Thu Sep 14 21:56:26 PDT 2006



Changes in directory llvm/lib/ExecutionEngine/JIT:

JITEmitter.cpp updated: 1.115 -> 1.116
---
Log message:

Unbreak the JIT


---
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.115 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.116
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.115	Thu Sep 14 13:23:26 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp	Thu Sep 14 23:56:11 2006
@@ -542,7 +542,7 @@
   // 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*)(intptr_t)LazyResolverFn;
-  if (F->isExternal())
+  if (F->isExternal() && !F->hasNotBeenReadFromBytecode())
     Actual = TheJIT->getPointerToFunction(F);
 
   // Otherwise, codegen a new stub.  For now, the stub will call the lazy
@@ -738,7 +738,7 @@
   void *ResultPtr = TheJIT->getPointerToGlobalIfAvailable(F);
   if (ResultPtr) return ResultPtr;
 
-  if (F->isExternal()) {
+  if (F->isExternal() && !F->hasNotBeenReadFromBytecode()) {
     // If this is an external function pointer, we can force the JIT to
     // 'compile' it, which really just adds it to the map.
     if (DoesntNeedStub)






More information about the llvm-commits mailing list