[PATCH] D65515: [llvm-readobj/libObject] - Introduce a custom warning handler for `ELFFile<ELFT>` methods.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 03:23:09 PDT 2019


grimar marked an inline comment as done.
grimar added a comment.

In D65515#1616514 <https://reviews.llvm.org/D65515#1616514>, @jhenderson wrote:

> Is there a test showing that we a) emit a warning only once per input, and b) multiple times, for multiple inputs (both archive members and when listing multiple objects on the command-line)?


We have `a)`, it is `elf-wrong-shstrtab-type.test`, but I do not think we have `b)` (mostly because I thought it could be a separate patch testing the warnings reported + changing all warnings we have at once),
but I can add a simple initial test for `b)` here, NP.



================
Comment at: tools/llvm-readobj/llvm-readobj.h:42
+
+  // TODO: This one is depricated. Use one with a Input name below.
   template <class T> T unwrapOrError(Expected<T> EO) {
----------------
jhenderson wrote:
> depricated -> deprecated
> 
> Do you plan to remove this function soon? I don't see why you shouldn't (apart from time to write it...!)
> 
> What about the ErrorOr version? Should that be updated too?
> Do you plan to remove this function soon? I don't see why you shouldn't (apart from time to write it...!)
I'd be happy, so yes, I'd do that.

> What about the ErrorOr version? Should that be updated too?
May be. (I just did not look deep yet about which functions should be eliminated and which cant't be).
I'll probably add a comment.


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

https://reviews.llvm.org/D65515





More information about the llvm-commits mailing list