[PATCH] D73174: [llvm-readobj] - Refine --needed-libs implementation and add a test.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 01:54:59 PST 2020


grimar added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2476
 
-  for (const auto &L : Libs)
+  for (const std::string &L : Libs)
     W.startLine() << L << "\n";
----------------
MaskRay wrote:
> jhenderson wrote:
> > StringRef?
> (I think keeping the original type does not hurt.)
I'd also keep the original type. Having a StringRef here is not faster, as adds a one more constructor call,
but I see no benefits from that. It does not improve readability. Instead it raises a question
"why a conversion to StringRef is needed here, is there something wrong with operator `<<` for std::string?"


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

https://reviews.llvm.org/D73174





More information about the llvm-commits mailing list