This is an archive of the discontinued LLVM Phabricator instance.

MergeFunc: preserve COMDAT information when creating a thunk
ClosedPublic

Authored by compnerd on Apr 18 2019, 6:00 PM.

Details

Reviewers
vsk
rjmccall
rnk
Summary

We would previously drop the COMDAT on the thunk we generated when replacing a function body with the forwarding thunk. This would result in a function that may have been multiply emitted and multiply merged to be emitted with the same name without the COMDAT. This is a hard error with PE/COFF where the COMDAT is used for the deduplication of Value Witness functions for Swift.

Diff Detail

Repository
rL LLVM

Event Timeline

compnerd created this revision.Apr 18 2019, 6:00 PM
rjmccall accepted this revision.Apr 18 2019, 6:14 PM

LGTM.

This revision is now accepted and ready to land.Apr 18 2019, 6:14 PM
compnerd closed this revision.Apr 18 2019, 6:49 PM

SVN r358728