[PATCH] D63475: [llvm-readobj] Allow --hex-dump/--string-dump to dump multiple sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 06:53:50 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: tools/llvm-readobj/ObjDumper.cpp:53
+    StringRef SecName;
+    error(SecRef.getName(SecName));
+    auto NameIt = SecNames.find(SecName);
----------------
jhenderson wrote:
> Interesting. I was not expecting `error()` to do nothing if passed a success! I don't mind this being left as is, but there is precedent elsewhere in this file to do:
> 
> ```
> if (...)
>   error(...);
> ```
> 
> See `printSectionsAsString` for such an example.
I'll leave it as is:)

The error(...) pattern is much more common, especially in coff/macho dumpers..


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63475





More information about the llvm-commits mailing list