Skip to content

Commit 119cc88

Browse files
committed
[CodeCompletion] Move implemetnation of CodeCompletionContext::copyString to header
1 parent 36c0bcc commit 119cc88

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

include/swift/IDE/CodeCompletionContext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ class CodeCompletionContext {
9090
}
9191

9292
/// Allocate a string owned by the code completion context.
93-
StringRef copyString(StringRef Str);
93+
StringRef copyString(StringRef Str) {
94+
return Str.copy(*CurrentResults.Allocator);
95+
}
9496

9597
/// Sort code completion results in an implementation-defined order
9698
/// in place.

lib/IDE/CodeCompletionContext.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
using namespace swift;
1616
using namespace swift::ide;
1717

18-
StringRef CodeCompletionContext::copyString(StringRef Str) {
19-
return Str.copy(*CurrentResults.Allocator);
20-
}
21-
2218
std::vector<CodeCompletionResult *>
2319
CodeCompletionContext::sortCompletionResults(
2420
ArrayRef<CodeCompletionResult *> Results) {

0 commit comments

Comments
 (0)