Any REPL client should just move to CompletionRequest instead of relying on
the translation code from the old API, so let's remove that translation code.
lldb::ValueObjectSP &valobj_sp,
ExpressionVariable *var = nullptr) = 0;
- virtual int CompleteCode(const std::string ¤t_code,
- StringList &matches) = 0;
+ virtual void CompleteCode(const std::string ¤t_code,
+ CompletionRequest &request) = 0;
OptionGroupFormat m_format_options = OptionGroupFormat(lldb::eFormatDefault);
OptionGroupValueObjectDisplay m_varobj_options;
current_code.append("\n");
current_code += request.GetRawLine();
- StringList matches;
- int result = CompleteCode(current_code, matches);
- if (result == -2) {
- assert(matches.GetSize() == 1);
- request.AddCompletion(matches.GetStringAtIndex(0), "",
- CompletionMode::RewriteLine);
- } else
- request.AddCompletions(matches);
+ CompleteCode(current_code, request);
}
bool QuitCommandOverrideCallback(void *baton, const char **argv) {