summaryrefslogtreecommitdiff
path: root/source/Utility/ArchSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Utility/ArchSpec.cpp')
-rw-r--r--source/Utility/ArchSpec.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/Utility/ArchSpec.cpp b/source/Utility/ArchSpec.cpp
index 320f2d9d1144f..1c50c313e0d17 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)