[InstrProf] Set prof global variables to internal linkage if adding a comdat
authorArthur Eubanks <aeubanks@google.com>
Wed, 3 Aug 2022 03:23:03 +0000 (20:23 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 4 Aug 2022 20:24:55 +0000 (13:24 -0700)
commit6e45162adfec14ef4f53ec99312cb26d23f929bc
tree84e6051fee9a833a27bbeabc1a598c4536678860
parentbc8f2f36496a3fda32943f261eebb9b053e44016
[InstrProf] Set prof global variables to internal linkage if adding a comdat

COFF has a verifier check that private global variables don't have a comdat of the same name.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D131043
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/comdat.ll
llvm/test/Instrumentation/InstrProfiling/profiling.ll