Skip to content

Commit 6b66d58

Browse files
committed
[SourceKit] Make CompletionInstance::performOperation private
All users of `CompletionInstance::performOperation` have been migrated to dedicated methods. `performOperation` with its callback that needs to invoke the second pass is now an implementation detail of `CompletionInstance`.
1 parent 76f2dbe commit 6b66d58

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/swift/IDE/CompletionInstance.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,6 @@ class CompletionInstance {
122122
llvm::function_ref<void(CancellableResult<CompletionInstanceResult>)>
123123
Callback);
124124

125-
public:
126-
CompletionInstance() : CachedCIShouldBeInvalidated(false) {}
127-
128-
// Mark the cached compiler instance "should be invalidated". In the next
129-
// completion, new compiler instance will be used. (Thread safe.)
130-
void markCachedCompilerInstanceShouldBeInvalidated();
131-
132-
// Update options with \c NewOpts. (Thread safe.)
133-
void setOptions(Options NewOpts);
134-
135125
/// Calls \p Callback with a \c CompilerInstance which is prepared for the
136126
/// second pass. \p Callback is resposible to perform the second pass on it.
137127
/// The \c CompilerInstance may be reused from the previous completions,
@@ -150,6 +140,16 @@ class CompletionInstance {
150140
llvm::function_ref<void(CancellableResult<CompletionInstanceResult>)>
151141
Callback);
152142

143+
public:
144+
CompletionInstance() : CachedCIShouldBeInvalidated(false) {}
145+
146+
// Mark the cached compiler instance "should be invalidated". In the next
147+
// completion, new compiler instance will be used. (Thread safe.)
148+
void markCachedCompilerInstanceShouldBeInvalidated();
149+
150+
// Update options with \c NewOpts. (Thread safe.)
151+
void setOptions(Options NewOpts);
152+
153153
void codeComplete(
154154
swift::CompilerInvocation &Invocation, llvm::ArrayRef<const char *> Args,
155155
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,

0 commit comments

Comments
 (0)