[Lldb-commits] [lldb] fc55b0b - [lldb][NFCI] Remove use of ConstString from OptionValue
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 6 08:49:42 PDT 2023
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
More information about the lldb-commits
mailing list