From: Chris Lattner Date: Wed, 25 Jun 2008 20:21:35 +0000 (+0000) Subject: Implement JIT support for global aliases, patch by David Chisnall! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18e045983757a7d2bae482d2abe444a5bb3ed134;p=oota-llvm.git 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 --- diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index f14d6f6ef48..cbfaa09e36d 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(V)) + return TheJIT->getPointerToGlobal(GA->resolveAliasedGlobal()); // If we have already compiled the function, return a pointer to its body. Function *F = cast(V);