summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-22 17:10:15 +0000
committerZachary Turner <zturner@google.com>2016-11-22 17:10:15 +0000
commitd6a24757876e7c1d29113f41ea241db262d9609c (patch)
tree8bc7a925d2d5bb5cc73b321929e7414f19947577 /lldb/source/Interpreter/CommandInterpreter.cpp
parent04dc211e6aa5936caf72297e2c305d2ae23096dd (diff)
downloadbcm5719-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.cpp7
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')
OpenPOWER on IntegriCloud