Author: Alex Langford Date: 2023-07-06T08:49:07-07:00 New Revision: fc55b0b38446be8948a291057b3086b4a01fe0a7
URL: https://github.com/llvm/llvm-project/commit/fc55b0b38446be8948a291057b3086b4a01fe0a7 DIFF: https://github.com/llvm/llvm-project/commit/fc55b0b38446be8948a291057b3086b4a01fe0a7.diff LOG: [lldb][NFCI] Remove use of ConstString from OptionValue Summary: No need to create a ConstString, `GetName` already returns a StringRef. Reviewers: JDevlieghere, mib, jasonmolenda Subscribers: Differential Revision: https://reviews.llvm.org/D154386 Added: Modified: lldb/source/Interpreter/OptionValue.cpp Removed: ################################################################################ diff --git a/lldb/source/Interpreter/OptionValue.cpp b/lldb/source/Interpreter/OptionValue.cpp index 2f110d53d95899..8d429b6bc9cf21 100644 --- a/lldb/source/Interpreter/OptionValue.cpp +++ b/lldb/source/Interpreter/OptionValue.cpp @@ -534,8 +534,8 @@ bool OptionValue::DumpQualifiedName(Stream &strm) const { if (m_parent_sp->DumpQualifiedName(strm)) dumped_something = true; } - ConstString name(GetName()); - if (name) { + llvm::StringRef name(GetName()); + if (!name.empty()) { if (dumped_something) strm.PutChar('.'); else _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits