[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
Thu Aug 1 01:45:26 PDT 2019


grimar added inline comments.


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:398
+  std::function<Error(const Twine &Msg)> WarningHandler;
+  std::set<std::string> Warnings;
+
----------------
jhenderson wrote:
> Should Warnings be private? Also set -> unordered_set.
I made it private. Making `set` to be `unordered_set` was a good idea,
but I can't do that now, when I have a set of pairs.
(It just doesn't compile, the problem is that (taken from stackoverflow): 
"std::unordered_set is using std::hash template to compute hashes for its entries and there is no std::hash specialization for pairs.")
So I had to use `set`, it does not seem to be critical here.


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

https://reviews.llvm.org/D65515





More information about the llvm-commits mailing list