Page MenuHomePhabricator

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

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

Details

Summary

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

Unit TestsFailed

TimeTest
220 msx64 windows > LLVM.tools/llvm-objdump/XCOFF::section-headers.test
Script: -- : 'RUN: at line 4'; c:\ws\w3\llvm-project\premerge-checks\build\bin\yaml2obj.exe C:\ws\w3\llvm-project\premerge-checks\llvm\test\tools\llvm-objdump\XCOFF\section-headers.test --docnum=1 -o C:\ws\w3\llvm-project\premerge-checks\build\test\tools\llvm-objdump\XCOFF\Output\section-headers.test.tmp-basic.o

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.

llvm/include/llvm/BinaryFormat/XCOFF.h
30

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.