diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:54 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:54 +0000 |
commit | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (patch) | |
tree | 37fd694b2fe544b0ccefb369794632592d138dde /source/Utility/ArchSpec.cpp | |
parent | f73363f1dd94996356cefbf24388f561891acf0b (diff) |
Diffstat (limited to 'source/Utility/ArchSpec.cpp')
-rw-r--r-- | source/Utility/ArchSpec.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/Utility/ArchSpec.cpp b/source/Utility/ArchSpec.cpp index 320f2d9d1144..1c50c313e0d1 100644 --- a/source/Utility/ArchSpec.cpp +++ b/source/Utility/ArchSpec.cpp @@ -255,12 +255,14 @@ size_t ArchSpec::AutoComplete(CompletionRequest &request) { for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i) { if (NameMatches(g_core_definitions[i].name, NameMatch::StartsWith, request.GetCursorArgumentPrefix())) - request.GetMatches().AppendString(g_core_definitions[i].name); + request.AddCompletion(g_core_definitions[i].name); } } else { - ListSupportedArchNames(request.GetMatches()); + StringList matches; + ListSupportedArchNames(matches); + request.AddCompletions(matches); } - return request.GetMatches().GetSize(); + return request.GetNumberOfMatches(); } #define CPU_ANY (UINT32_MAX) |