[JITLink] Allow moving a Symbol to a Block in a different Section
authorBen Langmuir <blangmuir@apple.com>
Tue, 14 Sep 2021 14:58:09 +0000 (07:58 -0700)
committerBen Langmuir <blangmuir@apple.com>
Tue, 14 Sep 2021 15:27:26 +0000 (08:27 -0700)
commit64c8e7489b01d1fb92eded6feb4913847b210cbd
tree721f1678d8a8a4383c540f318223ff1ce12a7861
parentd0d9e6f0849b2e76e980e2edf365302f47f4e35f
[JITLink] Allow moving a Symbol to a Block in a different Section

When moving a Symbol between Blocks that are in different Sections,
update the symbol tables for each Section. Otherwise
symbol.getBlock().getSection() will not match the contents of
Section::symbols(), which asserts during linking.

Differential Revision: https://reviews.llvm.org/D109724
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp