Fix a bug introduced by r59265. If lazy compilation is disabled, return actual function ptr instead of ptr to stub if function is already compiled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60822 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-12-10 01:33:59 +00:00
parent 2dae65d13b
commit 369e02da1b

View 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