What is the expected way of gaining access to llvm_gc_root_chain when using JIT?
The only way I could figure out was this:
// EPIC KLUDGE
auto wrong = _module->getNamedGlobal(“llvm_gc_root_chain”);
auto right = new llvm::GlobalVariable(
false, // variable
…which works, has a bit of a smell about it.
I cannot use the LLVM’s definition from my GC because this is running in JIT.
I gave up trying to give it external linkage before shadow-stack-gc-lowering-pass since it makes a unique struct type that I cannot match (or I’m misunderstanding something badly), causing Stores to fail when using my definition.