[PATCH] D110990: [Orc] Fix global variable destructor function support when --jit-kind=orc-lazy
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 2 10:49:00 PDT 2021
lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks Stephen!
================
Comment at: llvm/lib/ExecutionEngine/Orc/LLJIT.cpp:479
+ else
+ raw_string_ostream(InitOrDeInitFunctionName) << M.getModuleIdentifier();
+
----------------
It would be good to use a `DeInitFunctionPrefix` here (along the same lines as `InitFunctionPrefix`).
Once the deinit functions are named with a known prefix we can look them up in `GenericLLVMIRPlatformSupport::notifyAdding` and add them to the DeInitFunctions map automatically. This will make destructors work from cached objects. This could be done in this patch, or in a follow-up.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110990/new/
https://reviews.llvm.org/D110990
More information about the llvm-commits
mailing list