[PATCH] D144783: [ELF] Move getSectionAndRelocations to ELF.cpp from ELFDumper.cpp

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 5 18:02:30 PST 2023


aidengrossman added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:6212
+    handleAllErrors(StackSizeRelocMapOrErr.takeError(), [&](StringError &SE) {
+      reportUniqueWarning(SE.getMessage());
+    });
----------------
rahmanl wrote:
> rahmanl wrote:
> > Can we turn these into failures without breaking any tests? I think early return is not consistent with reporting warnings anymore.
> Alternatively, report a warning similar to
> `reportWarning("unable to print stack size: " + StackSizeRelocMapOrErr.takeError().getMessage())`
I've changed the function to fail early (since before the latest revision I just had it looping through to find all the errors which doesn't make sense). This breaks one test that had the same duplicate failure which I've fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144783



More information about the llvm-commits mailing list