This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf] Use comdats on COFF for available_externally functions
ClosedPublic

Authored by rnk on Jul 26 2018, 3:38 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Jul 26 2018, 3:38 PM
davidxl accepted this revision.Jul 26 2018, 3:53 PM

lgtm

This revision is now accepted and ready to land.Jul 26 2018, 3:53 PM
This revision was automatically updated to reflect the committed changes.