diff options
author | Zachary Turner <zturner@google.com> | 2016-11-22 17:10:15 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-11-22 17:10:15 +0000 |
commit | d6a24757876e7c1d29113f41ea241db262d9609c (patch) | |
tree | 8bc7a925d2d5bb5cc73b321929e7414f19947577 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 04dc211e6aa5936caf72297e2c305d2ae23096dd (diff) | |
download | bcm5719-llvm-d6a24757876e7c1d29113f41ea241db262d9609c.tar.gz bcm5719-llvm-d6a24757876e7c1d29113f41ea241db262d9609c.zip |
Re-add "demonstrate new Args API"
This fixes the build breakage due to the use of C++14.
llvm-svn: 287647
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 251f591ec9c..36651519eb9 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1859,9 +1859,8 @@ int CommandInterpreter::HandleCompletion( // put an empty string in element 0. std::string command_partial_str; if (cursor_index >= 0) - command_partial_str.assign(parsed_line.GetArgumentAtIndex(cursor_index), - parsed_line.GetArgumentAtIndex(cursor_index) + - cursor_char_position); + command_partial_str = + parsed_line[cursor_index].ref.take_front(cursor_char_position); std::string common_prefix; matches.LongestCommonPrefix(common_prefix); @@ -1872,7 +1871,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.GetArgumentQuoteCharAtIndex(cursor_index); + char quote_char = parsed_line[cursor_index].quote; common_prefix = Args::EscapeLLDBCommandArgument(common_prefix, quote_char); if (quote_char != '\0') |