Fix PR475.

llvm-svn: 18515
This commit is contained in:
Alkis Evlogimenos 2004-12-05 01:51:20 +00:00
parent a90f19621b
commit 8c5affedd1
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,10 @@ void *JIT::getPointerToFunctionOrStub(Function *F) {
if (void *Addr = getPointerToGlobalIfAvailable(F))
return Addr;
// Get a stub if the target supports it
if (void *Addr = TJI.emitFunctionStub(F, *MCE))
return Addr;
// Otherwise, if the target doesn't support it, just codegen the function.
return getPointerToFunction(F);
}