[PATCH] D129533: [ADT] Pass string_view via copy

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 02:11:34 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/ADT/Twine.h:294
     /// storing one (or a pointer to one) inside a Twine, which avoids problems
     /// when mixing code compiled under various C++ standards.
+    /*implicit*/ Twine(std::string_view Str) : LHSKind(PtrAndLengthKind) {
----------------
Please can you add to the comment that passing string_view by value is preferred.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129533



More information about the llvm-commits mailing list