[ORC] Reset MaterializationUnit::InitSymbol if the init symbol is discarded.
authorLang Hames <lhames@gmail.com>
Sun, 23 Oct 2022 20:26:24 +0000 (13:26 -0700)
committerLang Hames <lhames@gmail.com>
Sun, 23 Oct 2022 20:55:55 +0000 (13:55 -0700)
commit56af226b63f86ed1317020ebfe7f8bdd6704998f
tree92a067f4871d74ada793b476987f7d9de73dc429
parente7673d982dc7ad8f848d79d6e457bf614ec1564f
[ORC] Reset MaterializationUnit::InitSymbol if the init symbol is discarded.

Discarding the init symbol is expected to be uncommon (it represents metadata
in the MaterializationUnit that is relevant to dlopen, and this will not
usually be fully duplicated in some other location), however if a client has
marked an InitSymbol as weak and it is selected to be discarded then we should
keep the data structure consistent.
llvm/include/llvm/ExecutionEngine/Orc/Core.h
llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp