Fix build failure on Linux and BSD by reverting r287597
Linux and BSD builds failing after this changes from rev 287597.
llvm-svn: 287631
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 3665151..251f591 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1859,8 +1859,9 @@
// 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 @@
// 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')