aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-25 20:21:35 +0000
committerChris Lattner <sabre@nondot.org>2008-06-25 20:21:35 +0000
commit18e045983757a7d2bae482d2abe444a5bb3ed134 (patch)
treef77c7a020d79df3313d77c96df388dda6d9104d3 /lib/ExecutionEngine
parent890aaa871046fa63e0cbb78681cecf3418865ac1 (diff)
downloadexternal_llvm-18e045983757a7d2bae482d2abe444a5bb3ed134.zip
external_llvm-18e045983757a7d2bae482d2abe444a5bb3ed134.tar.gz
external_llvm-18e045983757a7d2bae482d2abe444a5bb3ed134.tar.bz2
Implement JIT support for global aliases, patch by David Chisnall!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index f14d6f6..cbfaa09 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/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);