[InstrProf] Use comdats on COFF for available_externally functions

Summary:
r262157 added ELF-specific logic to put a comdat on the __profc_*
globals created for available_externally functions. We should be able to
generalize that logic to all object file formats that support comdats,
i.e. everything other than MachO. This fixes duplicate symbol errors,
since on COFF, linkonce_odr doesn't make the symbol weak.

Fixes PR38251.

Reviewers: davidxl, xur

Subscribers: hiraditya, dmajor, llvm-commits, aheejin

Differential Revision: https://reviews.llvm.org/D49882

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338082 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed