[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
Wed Jul 31 23:33:12 PDT 2019


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


================
Comment at: test/tools/llvm-readobj/elf-invalid-shstrndx.test:11
 # GNU-EMPTY:
-# GNU-NEXT:  error: '[[FILE]]': section header string table index 255 does not exist
+# GNU-NEXT:  error: section header string table index 255 does not exist
 
----------------
jhenderson wrote:
> It makes me sad that we've lost the file name here. Can we do anything about it, by using an error function that prepends the file name?
Yes, I also came to conclusion before going to sleep yesterday, that keeping the file name is very important here.
I think if we dump an archive then absence of the file name in the error message might "deduplicate" them when dumping file A
and prevent showing the same errors for the file B. I though that we either can reset the deduplication string set before starting dumping the new file or ensure we included the file name. And the last one seems to be more handy way.

I think I could just include the file name in the new warnings handler. I'll try.


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

https://reviews.llvm.org/D65515





More information about the llvm-commits mailing list