ExecutionEngine::getPointerToGlobal gets to unreachable if passed a GlobalAlias.
Details
Diff Detail
Event Timeline
David, sorry for the late response, I had not seen an e-mail update from Phab, probably due to the e-mail problems it had.
I have a test case (code above) but can't run it with lit since lit knows how to run under mcjit (%lli_mcjit) but not under jit. We would have to teach lli to use the jit just to test this.
Anyhow, while I encuntered the problem using the JIT, the patch teaches ExecutionEngine::getPointerToGlobal to handle GlobalAlias and is not really JIT specific.
Hi Yaron,
This looks good to me, but Dave is right that a test case would be nice.
How did you compile that C++ code to IR, and how did you invoke the JIT?
While %lli_mcjit will run MCJIT, I believe that a vanilla lli call will use the old JIT, which should allow us to test this. If more infrastructure is needed to test this I'm happy to look in to adding it.
Cheers,
Lang.