[PATCH] D108780: [lld-macho] Refactor archive loading

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 26 13:28:56 PDT 2021


oontvoo accepted this revision.
oontvoo added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lld/MachO/Driver.cpp:261-267
+          if (Error e = file->fetch(c, reason))
+            error(toString(file) + ": " + reason +
+                  " failed to load archive member: " + toString(std::move(e)));
         }
+        if (e)
+          error(toString(file) +
+                ": Archive::children failed: " + toString(std::move(e)));
----------------
int3 wrote:
> oontvoo wrote:
> > We've already done `error()` on line 262, why do we need to do it again on 266?
> > (Wouldn't this error on the last error twice?)
> They're different errors -- one error is from fetching, the other one from trying to get the children
D'oh - different errors, same name. Sorry missed it!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108780



More information about the llvm-commits mailing list