[ORC] Add a unit test to verify that bound weak symbols can't be overridden.
authorLang Hames <lhames@gmail.com>
Wed, 9 Nov 2022 19:13:18 +0000 (11:13 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 9 Nov 2022 19:22:31 +0000 (11:22 -0800)
commitc92ddf4e235932ee6d03d5ea878a084b73a07974
tree4b5e0861e30935dcd45b54bdc911af132ffd489c
parent59052468c3e38cab15582cefbb5133fd4c2ffce5
[ORC] Add a unit test to verify that bound weak symbols can't be overridden.

Weak symbols can be overridden while they're in the NeverSearched state, but
should not be able to be overridden once they've been bound by some lookup.
Historically we guaranteed this by stripping the weak flag once a symbol as
bound, causing it to appear as if it were strong. In ffe2dda29f3 we changed
that behavior to retain weak flags on symbols (to facilitate tracking for
dynamic re-binding during dlopen). This test checks that we still fail as
required after ffe2dda29f3.
llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp