[PATCH] D106783: [AIX][XCOFF][llvm-readobj] Replace unwrapOrError with reportUniqueWarning

Maryam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 01:04:12 PDT 2021


MaryamBen marked 2 inline comments as done.
MaryamBen added inline comments.


================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:139
+    if (Error E = ErrOrRelocations.takeError())
+      reportUniqueWarning(std::move(E));
+
----------------
jhenderson wrote:
> 1) Is this tested?
> 2) You'll need to break out of or continue this loop here, as `*ErrOrRelocations` will result in referencing invalid memory if there is an error. (reportUniqueWarning reports the warning and continues).
I don't know how to test it. 
None of the existing tests reports the UniqueWarning


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

https://reviews.llvm.org/D106783



More information about the llvm-commits mailing list