Fix PR475.
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Sun, 5 Dec 2004 01:51:20 +0000 (01:51 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Sun, 5 Dec 2004 01:51:20 +0000 (01:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18515 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/JIT.cpp

index 537ca56e024839b4e3930fb344ad5eff6cd262a8..6427bf32e8889ef7f6cacd4a5b354cbcf7c9c582 100644 (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);
 }