aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.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/Commands/CommandObjectFrame.cpp
parent04dc211e6aa5936caf72297e2c305d2ae23096dd (diff)
downloadllvm-d6a24757876e7c1d29113f41ea241db262d9609c.zip
llvm-d6a24757876e7c1d29113f41ea241db262d9609c.tar.gz
llvm-d6a24757876e7c1d29113f41ea241db262d9609c.tar.bz2
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/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 56e2cc9..74de945 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -473,12 +473,12 @@ public:
bool &word_complete,
StringList &matches) override {
// Arguments are the standard source file completer.
- std::string completion_str(input.GetArgumentAtIndex(cursor_index));
- completion_str.erase(cursor_char_position);
+ auto completion_str = input[cursor_index].ref;
+ completion_str = completion_str.take_front(cursor_char_position);
CommandCompletions::InvokeCommonCompletionCallbacks(
GetCommandInterpreter(), CommandCompletions::eVariablePathCompletion,
- completion_str.c_str(), match_start_point, max_return_elements, nullptr,
+ completion_str, match_start_point, max_return_elements, nullptr,
word_complete, matches);
return matches.GetSize();
}