diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-12-05 01:51:20 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-12-05 01:51:20 +0000 |
commit | 9d272d4953ecdeb787e16c80ef28cb4352f53a68 (patch) | |
tree | 3e9993d351094478ba65561af04b5eeb0d06ca6b /lib/ExecutionEngine/JIT/JIT.cpp | |
parent | bb622c880235e588f8ec78c8cfd67c1b4525e326 (diff) |
Fix PR475.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 537ca56e02..6427bf32e8 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -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); } |