[PATCH] D78983: [ELF] Add --print-archive-stats=

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 06:24:06 PDT 2020


grimar added inline comments.


================
Comment at: lld/ELF/InputFiles.cpp:1178
+  // This function is used by --print-archive-stats=, where an error does not
+  // really matter.
+  consumeError(std::move(err));
----------------
What do you think if instead of adding a `size_t getMemberCount() const;` to `ArchiveFile` we add:

```
Archive* getArchiveFile() const;
```

And then just inline the logic of `getMemberCount()` to `writeArchiveStats()`?

(The logic is not used anywhere else and I can't say that such loops look nice,
perhaps hiding it away from the general code might look better).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78983





More information about the llvm-commits mailing list