This is an archive of the discontinued LLVM Phabricator instance.

[NFC][XCOFF] Replace structs FileHeader32/SectionHeader32 with constants.

Authored by Esme on Jun 8 2021, 8:37 AM.



Some structs like FileHeader32/SectionHeader32 defined in llvm/include/llvm/BinaryFormat/XCOFF.h seem unnecessary, because we only need their size. So this patch removes them and defines size constants directly.

Diff Detail

Event Timeline

Esme created this revision.Jun 8 2021, 8:37 AM
Esme requested review of this revision.Jun 8 2021, 8:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2021, 8:37 AM
sfertile accepted this revision as: sfertile.Jun 8 2021, 9:21 AM

One comment but otherwise LGTM.


The constants for the 64-bit XCOFF headers/relocs aren't used yet so they shouldn't be added in this patch. You can add them in the yaml changes that use them.

This revision is now accepted and ready to land.Jun 8 2021, 9:21 AM
Higuoxing accepted this revision.Jun 8 2021, 5:50 PM

LGTM, once @sfertile 's comments are addressed. Thanks!

Esme updated this revision to Diff 350770.Jun 8 2021, 8:14 PM

Addressed comments.

This revision was landed with ongoing or failed builds.Jun 10 2021, 4:11 AM
This revision was automatically updated to reflect the committed changes.