[PATCH] D107968: [llvm-readobj] Refactor ELFDumper::printAttributes()

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 02:26:58 PDT 2021


jhenderson added a comment.

In D107968#2948883 <https://reviews.llvm.org/D107968#2948883>, @jozefl wrote:

> Ah yes that makes sense. My mistake was assuming there were other targets with
> unimplemented ELF attribute support when in fact, MSP430 is the only one.

I wouldn't assume that there aren't others, but at this point, we can't know which machine kinds might still be missing an implementation, so we can't really warn for them.



================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2566
+    else
+      W.startLine() << "Attributes not implemented for big-endian modes.\n";
+    break;
----------------
This might be a good chance to change the stdout message to a stderr warning, by using `printUniqueWarning()`. Also a good chance to change the style to match the current LLVM warning styles (i.e. no leading capital letter and no trailing full stop - if using `printUniqueWarning`, you can also omit the `\n`).

You could also change the text to say "big-endian ARM" (and RISCV below). I'd also change "modes" to "objects". Approximate full suggestion inline.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107968/new/

https://reviews.llvm.org/D107968



More information about the llvm-commits mailing list