This is an archive of the discontinued LLVM Phabricator instance.

[NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files.
ClosedPublic

Authored by Esme on May 26 2021, 2:54 AM.

Details

Summary

This a minor patch to refactor the test file, llvm-objdump/XCOFF/section-headers.test, to use yaml2obj for this testing rather than a canned binary.

Diff Detail

Event Timeline

Esme created this revision.May 26 2021, 2:54 AM
Esme requested review of this revision.May 26 2021, 2:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2021, 2:54 AM
jhenderson added inline comments.May 26 2021, 3:11 AM
llvm/test/tools/llvm-objdump/XCOFF/section-headers.test
19–22

Nit: here and elsewhere, remove the excessive spacing, as per the inline example.

62
68

I know this was there before, but is this the full error message? I'd expect it to at least say something like: "error: ...". Also, a separate patch, but this error does not follow the LLVM style guide for error messages (it should be "the end", not "The end").

Esme updated this revision to Diff 347886.May 26 2021, 3:28 AM

Address comment.

llvm/test/tools/llvm-objdump/XCOFF/section-headers.test
68

Yes, this should be another follow-up work.

This revision is now accepted and ready to land.May 26 2021, 3:40 AM
This revision was landed with ongoing or failed builds.Jun 8 2021, 8:12 PM
This revision was automatically updated to reflect the committed changes.
jhenderson added inline comments.Jun 9 2021, 12:00 AM
llvm/test/tools/llvm-objdump/XCOFF/section-headers.test
64

https://reviews.llvm.org/harbormaster/unit/view/775092/ suggests there might be a problem here. This will expand to a Windows path with only single backslashes in which will cause problems when python tries to consume it on some machines (because \<char> might be an escape char). I think there's a simple fix: use %/t instead, as that replaces all backslashes with forward slashes in the substitution.