[PATCH] D92318: [llvm-readobj, libSupport] - Refine the implementation of the code that dumps build attributes.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 01:39:25 PST 2020


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with one nit.



================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2919
 
-    // TODO: Delete the redundant FormatVersion check above.
-    if (Machine == EM_ARM) {
-      if (Error E = ARMAttributeParser(&W).parse(Contents, support::little))
-        reportWarning(std::move(E), ObjF.getFileName());
-    } else if (Machine == EM_RISCV) {
-      if (Error E = RISCVAttributeParser(&W).parse(Contents, support::little))
-        reportWarning(std::move(E), ObjF.getFileName());
-    }
+    auto ParseAttrubutes = [&]() -> Error {
+      if (Machine == EM_ARM)
----------------
Do you need the trailing return type? I don't think there's any conversion involved, so it should work without it?


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

https://reviews.llvm.org/D92318



More information about the llvm-commits mailing list