summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 5cb2eaddf7b..a3f0d4f96d7 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1373,12 +1373,13 @@ CommandObject *CommandInterpreter::BuildAliasResult(
index);
result.SetStatus(eReturnStatusFailed);
return nullptr;
+ } else {
+ size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index));
+ if (strpos != std::string::npos)
+ raw_input_string = raw_input_string.erase(
+ strpos, strlen(cmd_args.GetArgumentAtIndex(index)));
+ result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
}
- size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index));
- if (strpos != std::string::npos)
- raw_input_string = raw_input_string.erase(
- strpos, strlen(cmd_args.GetArgumentAtIndex(index)));
- result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
}
alias_result = result_str.GetData();
OpenPOWER on IntegriCloud