diff options
author | Omair Javaid <omair.javaid@linaro.org> | 2016-11-22 09:47:00 +0000 |
---|---|---|
committer | Omair Javaid <omair.javaid@linaro.org> | 2016-11-22 09:47:00 +0000 |
commit | 99a318e11220f733e8bae8cb8417862ac979f7ea (patch) | |
tree | a588e205dd582de84165c9af8b39a5941be1e011 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 49b3733d57692a4726cce257e95932f2b74a2b30 (diff) | |
download | bcm5719-llvm-99a318e11220f733e8bae8cb8417862ac979f7ea.tar.gz bcm5719-llvm-99a318e11220f733e8bae8cb8417862ac979f7ea.zip |
Fix build failure on Linux and BSD by reverting r287597
Linux and BSD builds failing after this changes from rev 287597.
llvm-svn: 287631
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 36651519eb9..251f591ec9c 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1859,8 +1859,9 @@ int CommandInterpreter::HandleCompletion( // put an empty string in element 0. std::string command_partial_str; if (cursor_index >= 0) - command_partial_str = - parsed_line[cursor_index].ref.take_front(cursor_char_position); + command_partial_str.assign(parsed_line.GetArgumentAtIndex(cursor_index), + parsed_line.GetArgumentAtIndex(cursor_index) + + cursor_char_position); std::string common_prefix; matches.LongestCommonPrefix(common_prefix); @@ -1871,7 +1872,7 @@ int CommandInterpreter::HandleCompletion( // Only do this if the completer told us this was a complete word, // however... if (num_command_matches == 1 && word_complete) { - char quote_char = parsed_line[cursor_index].quote; + char quote_char = parsed_line.GetArgumentQuoteCharAtIndex(cursor_index); common_prefix = Args::EscapeLLDBCommandArgument(common_prefix, quote_char); if (quote_char != '\0') |