bulbazord created this revision.
bulbazord added reviewers: fdeazeve, kastiglione, mib, jasonmolenda.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
StringRef was made to be passed by value efficientl
kastiglione added inline comments.
Herald added a subscriber: JDevlieghere.
Comment at: lldb/source/Utility/ConstString.cpp:305
-void ConstString::SetString(const llvm::StringRef &s) {
- m_string = StringPool().GetConstCStringWithLength(s.data(), s.size());
+void ConstString::
bulbazord added inline comments.
Comment at: lldb/source/Utility/ConstString.cpp:305
-void ConstString::SetString(const llvm::StringRef &s) {
- m_string = StringPool().GetConstCStringWithLength(s.data(), s.size());
+void ConstString::SetString(const llvm::StringRef s) {
+ m_s
kastiglione added inline comments.
Comment at: lldb/source/Utility/ConstString.cpp:305
-void ConstString::SetString(const llvm::StringRef &s) {
- m_string = StringPool().GetConstCStringWithLength(s.data(), s.size());
+void ConstString::SetString(const llvm::StringRef s) {
+ m
bulbazord updated this revision to Diff 527908.
bulbazord added a comment.
Remove `const` where unneeded.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152010/new/
https://reviews.llvm.org/D152010
Files:
lldb/include/lldb/Utility/ConstString.h
fdeazeve accepted this revision.
fdeazeve added a comment.
LGTM, thanks for picking this up!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152010/new/
https://reviews.llvm.org/D152010
___
lldb-commits ma
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8a4636929fd6: [lldb][NFCI] ConstString methods should take
StringRefs by value (authored by bulbazord).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152010/