Author: Alex Langford Date: 2023-08-17T10:44:01-07:00 New Revision: 3415798f7993974a19bd22b0481f2f6a71e4a2ab
URL: https://github.com/llvm/llvm-project/commit/3415798f7993974a19bd22b0481f2f6a71e4a2ab DIFF: https://github.com/llvm/llvm-project/commit/3415798f7993974a19bd22b0481f2f6a71e4a2ab.diff LOG: [lldb][NFCI] Remove unneeded ConstString from ValueObject::GetValueForExpressionPath_Impl Differential Revision: https://reviews.llvm.org/D158026 Added: Modified: lldb/source/Core/ValueObject.cpp Removed: ################################################################################ diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 37d32e807fdbc2..ed9e26aad0f30b 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2131,11 +2131,10 @@ ValueObjectSP ValueObject::GetValueForExpressionPath_Impl( temp_expression = temp_expression.drop_front(); // skip . or > size_t next_sep_pos = temp_expression.find_first_of("-.[", 1); - ConstString child_name; if (next_sep_pos == llvm::StringRef::npos) // if no other separator just // expand this last layer { - child_name.SetString(temp_expression); + llvm::StringRef child_name = temp_expression; ValueObjectSP child_valobj_sp = root->GetChildMemberWithName(child_name); @@ -2203,8 +2202,7 @@ ValueObjectSP ValueObject::GetValueForExpressionPath_Impl( } else // other layers do expand { llvm::StringRef next_separator = temp_expression.substr(next_sep_pos); - - child_name.SetString(temp_expression.slice(0, next_sep_pos)); + llvm::StringRef child_name = temp_expression.slice(0, next_sep_pos); ValueObjectSP child_valobj_sp = root->GetChildMemberWithName(child_name); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits