[PATCH] D129533: [ADT] Pass string_view via copy
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 00:43:52 PDT 2022
RKSimon added a comment.
Remind me - can we forward declare string_view or is it a bulky header dependent nightmare like std::string ?
================
Comment at: llvm/include/llvm/ADT/Twine.h:303
/// Construct from a StringRef.
- /*implicit*/ Twine(const StringRef &Str) : LHSKind(PtrAndLengthKind) {
+ /*implicit*/ Twine(StringRef Str) : LHSKind(PtrAndLengthKind) {
LHS.ptrAndLength.ptr = Str.data();
----------------
This probably should be done seperately and part of a larger refactor away from const StringRef & args IF we can confirm that its beneficial - it will probably need an update in the coding guidelines as well.
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