aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-13 11:26:48 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-13 11:26:48 +0000
commit0d9a201e2624998922f825ebbe01aae0cce4bbd5 (patch)
tree3d844315931e3026c40a44de0d2117368e82360d /lldb/source/Commands/CommandObjectMultiword.cpp
parent930ebc15a6398710e84eea16b735721fe4a2c2fd (diff)
downloadllvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.zip
llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.tar.gz
llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.tar.bz2
[lldb][NFC] Remove ArgEntry::ref member
The StringRef should always be identical to the C string, so we might as well just create the StringRef from the C-string. This might be slightly slower until we implement the storage of ArgEntry with a string instead of a std::unique_ptr<char[]>. Until then we have to do the additional strlen on the C string to construct the StringRef. llvm-svn: 371842
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index a223d70..e33a5e0 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -93,7 +93,7 @@ bool CommandObjectMultiword::Execute(const char *args_string,
return result.Succeeded();
}
- auto sub_command = args[0].ref;
+ auto sub_command = args[0].ref();
if (sub_command.empty())
return result.Succeeded();
@@ -180,7 +180,7 @@ void CommandObjectMultiword::GenerateHelpText(Stream &output_stream) {
}
void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) {
- auto arg0 = request.GetParsedLine()[0].ref;
+ auto arg0 = request.GetParsedLine()[0].ref();
if (request.GetCursorIndex() == 0) {
StringList new_matches, descriptions;
AddNamesMatchingPartialString(m_subcommand_dict, arg0, new_matches,
@@ -225,7 +225,7 @@ const char *CommandObjectMultiword::GetRepeatCommand(Args &current_command_args,
if (current_command_args.GetArgumentCount() <= index)
return nullptr;
CommandObject *sub_command_object =
- GetSubcommandObject(current_command_args[index].ref);
+ GetSubcommandObject(current_command_args[index].ref());
if (sub_command_object == nullptr)
return nullptr;
return sub_command_object->GetRepeatCommand(current_command_args, index);