This is an archive of the discontinued LLVM Phabricator instance.

[clang][XCOFF] Indicate that XCOFF does not support COMDATs
ClosedPublic

Authored by daltenty on Feb 14 2020, 10:36 AM.

Details

Summary

XCOFF doesn't support COMDATs, so clang shouldn't emit them.

Diff Detail

Event Timeline

daltenty created this revision.Feb 14 2020, 10:36 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 14 2020, 10:36 AM
daltenty updated this revision to Diff 244708.Feb 14 2020, 10:38 AM
  • Add missing newline
Harbormaster completed remote builds in B46524: Diff 244708.
  1. We should probably update the COMDAT section of the lang ref to mention XCOFF doens't support COMDATS.
  2. Will we report an error somewhere in the backend if we encounter a COMDAT?

Will we report an error somewhere in the backend if we encounter a COMDAT?

I hit this when I was doing my static init patch as well: error in backend: COMDAT not yet supported by AIX.

  1. We should probably update the COMDAT section of the lang ref to mention XCOFF doesn't support COMDATS.

I will update the langref as suggested.

  1. Will we report an error somewhere in the backend if we encounter a COMDAT?

As mentioned by @Xiangling_L, we will run into report_fatal_error("COMDAT not yet supported by AIX.").

daltenty planned changes to this revision.Feb 18 2020, 8:04 AM
daltenty updated this revision to Diff 245201.Feb 18 2020, 10:26 AM
  • Update lang doc to indicate XCOFF doesn't support COMDAT
sfertile accepted this revision.Feb 18 2020, 12:23 PM

LGTM.

llvm/docs/LangRef.rst
913–914

really minor nit: The current wording sounds a bit odd to my ear. Maybe either XCOFF and Mach-O platforms or XCOFF and Mach-O don't support COMDATs, ...

This revision is now accepted and ready to land.Feb 18 2020, 12:23 PM
This revision was automatically updated to reflect the committed changes.