[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-12 Thread Jordan Rupprecht via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG60a8a504f16d: [llvm-objdump] Print file format in lowercase to match GNU output. (authored by rupprecht). Changed prior to commit: https://reviews.llvm.org/D74433?vs=243991&id=244189#toc Repository:

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Wasm is not an acronym so we don't usually display it in uppercase. So yes, I think we should change WasmObjectFile::getFileFormatName() to return lowercase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74433/new/ https:/

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-12 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. I don't really have a strong opinion either way. By strict style rules, "ELF" is an acronym, so should be all upper-case. In regular text, I'd expect it to be ELF everywhere too. On the other hand, as pointed out, "elf" is the bfd naming style. For WASM, I recall th

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D74433#1870647 , @MaskRay wrote: > Wait. I wonder whether we can change llvm-readobj to use lower case names as > well. The following should be updated: > > StringRef ELFObjectFile::getFileFormatName() const { > bool Is

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht updated this revision to Diff 243991. rupprecht marked an inline comment as done. rupprecht added a comment. - Use StringRef::lower() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74433/new/ https://reviews.llvm.org/D74433 Files: clang

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think the patch is good to go on its own, after the `outs() << ":\tfile format " << O->getFileFormatName().lower() << "\n\n";` change. If the consensus is to also change llvm-readobj output, we can teach `getFileFormatName()` to use lower case names and remove `.lower

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: grimar. MaskRay added a comment. Wait. I wonder whether we can change llvm-readobj to use lower case names as well. The following should be updated: StringRef ELFObjectFile::getFileFormatName() const { bool IsLittleEndian = ELFT::TargetEndianness == support::lit

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Verified that coff, elf, and mach-o are printed as lower cases. I believe bpf is similar. Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:2176 +outs() << ":\tfile

[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

2020-02-11 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht created this revision. rupprecht added reviewers: MaskRay, jhenderson. Herald added subscribers: llvm-commits, cfe-commits, kerbowa, nhaehnle, jvesely. Herald added a reviewer: alexshap. Herald added projects: clang, LLVM. GNU objdump prints the file format in lowercase, e.g. `elf64-x86-