[CodeComplete] Store the compiler instace as a shared pointer in CompletionInstance

This commit is contained in:
Alex Hoppen
2022-07-21 16:54:58 +02:00
parent dec32674ef
commit 1150e700a5
5 changed files with 48 additions and 56 deletions

View File

@@ -76,10 +76,11 @@ std::vector<Completion *> SourceKit::CodeCompletion::extendCompletions(
const Options &options, Completion *prefix, bool clearFlair) {
ImportDepth depth;
if (info.swiftASTContext) {
if (info.compilerInstance) {
// Build import depth map.
depth = ImportDepth(*info.swiftASTContext,
info.invocation->getFrontendOptions());
depth = ImportDepth(
info.compilerInstance->getASTContext(),
info.compilerInstance->getInvocation().getFrontendOptions());
}
if (info.completionContext)