[JITLink][COFF] Handle out-of-order COMDAT second symbol.
authorSunho Kim <ksunhokim123@gmail.com>
Mon, 25 Jul 2022 14:02:31 +0000 (23:02 +0900)
committerSunho Kim <ksunhokim123@gmail.com>
Mon, 25 Jul 2022 14:02:31 +0000 (23:02 +0900)
commit07aa8fc8db6b4b8581e0ba8ef4a66274023c0b59
treee717bc26328d71838bd9664ba864a9d2b5d97c31
parentb4878493dc3e1a2ecce45a917229f0d51947425c
[JITLink][COFF] Handle out-of-order COMDAT second symbol.

Handle out-of-order COMDAT second symbols. In llvm codegen, the second symbol of COMDAT sequence always follows the first symbol in the global symbol list. But, when the object file came from MSVC compiler, these can come in out of order.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D129721
llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_intervene.test [new file with mode: 0644]