Skip to content

Commit 3415798

Browse files
committed
[lldb][NFCI] Remove unneeded ConstString from ValueObject::GetValueForExpressionPath_Impl
Differential Revision: https://reviews.llvm.org/D158026
1 parent 9e6d48e commit 3415798

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lldb/source/Core/ValueObject.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,11 +2131,10 @@ ValueObjectSP ValueObject::GetValueForExpressionPath_Impl(
21312131
temp_expression = temp_expression.drop_front(); // skip . or >
21322132

21332133
size_t next_sep_pos = temp_expression.find_first_of("-.[", 1);
2134-
ConstString child_name;
21352134
if (next_sep_pos == llvm::StringRef::npos) // if no other separator just
21362135
// expand this last layer
21372136
{
2138-
child_name.SetString(temp_expression);
2137+
llvm::StringRef child_name = temp_expression;
21392138
ValueObjectSP child_valobj_sp =
21402139
root->GetChildMemberWithName(child_name);
21412140

@@ -2203,8 +2202,7 @@ ValueObjectSP ValueObject::GetValueForExpressionPath_Impl(
22032202
} else // other layers do expand
22042203
{
22052204
llvm::StringRef next_separator = temp_expression.substr(next_sep_pos);
2206-
2207-
child_name.SetString(temp_expression.slice(0, next_sep_pos));
2205+
llvm::StringRef child_name = temp_expression.slice(0, next_sep_pos);
22082206

22092207
ValueObjectSP child_valobj_sp =
22102208
root->GetChildMemberWithName(child_name);

0 commit comments

Comments
 (0)