diff options
author | Zachary Turner <zturner@google.com> | 2016-10-04 01:34:39 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-10-04 01:34:39 +0000 |
commit | f9fd8cbf2283955119c64bd32783aa6c60c1a285 (patch) | |
tree | aadf5f353fc764b108c7e3d0ff3dde61580a8fe8 | |
parent | 283fbc24f62162d2eaaf957707a4956cb7d9d385 (diff) | |
download | bcm5719-llvm-f9fd8cbf2283955119c64bd32783aa6c60c1a285.tar.gz bcm5719-llvm-f9fd8cbf2283955119c64bd32783aa6c60c1a285.zip |
Fix TestNestedAliases.py
I missed an if/else branch when doing the conversion.
llvm-svn: 283176
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 11 |
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(); |