Skip to content

Commit 8c5affe

Browse files
committed
Fix PR475.
llvm-svn: 18515
1 parent a90f196 commit 8c5affe

File tree

1 file changed

+4
-0
lines changed
  • llvm/lib/ExecutionEngine/JIT

1 file changed

+4
-0
lines changed

llvm/lib/ExecutionEngine/JIT/JIT.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ void *JIT::getPointerToFunctionOrStub(Function *F) {
274274
if (void *Addr = getPointerToGlobalIfAvailable(F))
275275
return Addr;
276276

277+
// Get a stub if the target supports it
278+
if (void *Addr = TJI.emitFunctionStub(F, *MCE))
279+
return Addr;
280+
277281
// Otherwise, if the target doesn't support it, just codegen the function.
278282
return getPointerToFunction(F);
279283
}

0 commit comments

Comments
 (0)