[Orc] Fix global variable destructor function support when --jit-kind=orc-lazy
authorluxufan <932494295@qq.com>
Sat, 9 Oct 2021 07:40:03 +0000 (15:40 +0800)
committerluxufan <932494295@qq.com>
Sat, 9 Oct 2021 07:58:21 +0000 (15:58 +0800)
commit02ac5e5cf12925cbd09213f3a4dfd5575d8c56d2
treee6932fb93ad539498a736d4493209844526128f5
parent4c0da2366305c49672d89ee0e90afcf85fa2641f
[Orc] Fix global variable destructor function support when --jit-kind=orc-lazy

The bug was reported here https://bugs.llvm.org/show_bug.cgi?id=52030

This patch follows the idea that @lhames commented in the above webpage.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D110990
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll