Fix a bug introduced by r59265. If lazy compilation is disabled, return actual functi...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 10 Dec 2008 01:33:59 +0000 (01:33 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 10 Dec 2008 01:33:59 +0000 (01:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/JITEmitter.cpp

index dd81f321c1203981bb01f3c0853f2dd347089ced..a74f53d2ab93dabbf9935bb3ad1c0c4e2f328a13 100644 (file)
@@ -611,7 +611,7 @@ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference,
   // If we have already compiled the function, return a pointer to its body.
   Function *F = cast<Function>(V);
   void *ResultPtr;
-  if (!DoesntNeedStub)
+  if (!DoesntNeedStub && !TheJIT->isLazyCompilationDisabled())
     // Return the function stub if it's already created.
     ResultPtr = Resolver.getFunctionStubIfAvailable(F);
   else