[InstrProfiling] Make COFF use the ELF comdat scheme (drop link.exe compatibility)
authorFangrui Song <i@maskray.me>
Thu, 19 Aug 2021 23:38:32 +0000 (16:38 -0700)
committerFangrui Song <i@maskray.me>
Thu, 19 Aug 2021 23:38:32 +0000 (16:38 -0700)
commitfbb8e772ec501a1b71643db90e9c6445e17d7cac
treef81f0eb7e5e6520d56de4a9bd2d913754b7d0f28
parent2f7ea054f30441cd5820b11cea59c37775515a4e
[InstrProfiling] Make COFF use the ELF comdat scheme (drop link.exe compatibility)

The COFF specific `DataReferencedByCode` complexity (D103372 D103717) is due to
a link.exe limitation: an external symbol in IMAGE_COMDAT_SELECT_ASSOCIATIVE is
not really dropped, so it can cause duplicate definition error.
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/linkage.ll
llvm/test/Instrumentation/InstrProfiling/platform.ll
llvm/test/Instrumentation/InstrProfiling/profiling.ll