Skip to content

Commit 70e3c99

Browse files
committed
[SourceKit] Remove performCompletionLikeOperation
All users of `performCodeCompletionLikeOperation` have been migrated to dedicated methods on `CompletionInstance`.
1 parent 163ccf9 commit 70e3c99

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,26 +1069,6 @@ void SwiftLangSupport::performWithParamsToCompletionLikeOperation(
10691069
CancellableResult<CompletionLikeOperationParams>::success(Params));
10701070
}
10711071

1072-
void SwiftLangSupport::performCompletionLikeOperation(
1073-
llvm::MemoryBuffer *UnresolvedInputFile, unsigned Offset,
1074-
ArrayRef<const char *> Args,
1075-
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,
1076-
llvm::function_ref<void(CancellableResult<CompletionInstanceResult>)>
1077-
Callback) {
1078-
performWithParamsToCompletionLikeOperation(
1079-
UnresolvedInputFile, Offset, Args, FileSystem,
1080-
[&](CancellableResult<CompletionLikeOperationParams> ParamsResult) {
1081-
ParamsResult.mapAsync<CompletionInstanceResult>(
1082-
[&](auto &CIParams, auto DeliverTransformed) {
1083-
getCompletionInstance()->performOperation(
1084-
CIParams.Invocation, Args, FileSystem,
1085-
CIParams.completionBuffer, Offset, CIParams.DiagC,
1086-
DeliverTransformed);
1087-
},
1088-
Callback);
1089-
});
1090-
}
1091-
10921072
CloseClangModuleFiles::~CloseClangModuleFiles() {
10931073
clang::Preprocessor &PP = loader.getClangPreprocessor();
10941074
clang::ModuleMap &ModMap = PP.getHeaderSearchInfo().getModuleMap();

tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -462,17 +462,6 @@ class SwiftLangSupport : public LangSupport {
462462
/// returns the original path;
463463
static std::string resolvePathSymlinks(StringRef FilePath);
464464

465-
/// Perform a completion like operation. It initializes a \c CompilerInstance,
466-
/// the calls \p Callback with it. \p Callback must perform the second pass
467-
/// using that instance.
468-
void performCompletionLikeOperation(
469-
llvm::MemoryBuffer *UnresolvedInputFile, unsigned Offset,
470-
ArrayRef<const char *> Args,
471-
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,
472-
llvm::function_ref<void(
473-
swift::ide::CancellableResult<swift::ide::CompletionInstanceResult>)>
474-
Callback);
475-
476465
/// The result returned from \c performWithParamsToCompletionLikeOperation.
477466
struct CompletionLikeOperationParams {
478467
swift::CompilerInvocation &Invocation;

0 commit comments

Comments
 (0)