diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-25 20:21:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-25 20:21:35 +0000 |
commit | 58ecfbdad68bb78753e94024afd80a5f96e97dfa (patch) | |
tree | 0eeb6ee4a287a58718158df95492806871f86311 /llvm/lib/ExecutionEngine | |
parent | 88ca48b09d526d7d23c88fe9f1d14dcdbbf680fe (diff) | |
download | bcm5719-llvm-58ecfbdad68bb78753e94024afd80a5f96e97dfa.tar.gz bcm5719-llvm-58ecfbdad68bb78753e94024afd80a5f96e97dfa.zip |
Implement JIT support for global aliases, patch by David Chisnall!
llvm-svn: 52738
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index f14d6f6ef48..cbfaa09e36d 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -551,6 +551,8 @@ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference, /// global immediately instead of queuing it for codegen later! return TheJIT->getOrEmitGlobalVariable(GV); } + if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) + return TheJIT->getPointerToGlobal(GA->resolveAliasedGlobal()); // If we have already compiled the function, return a pointer to its body. Function *F = cast<Function>(V); |