mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeComplete] Store the compiler instace as a shared pointer in CompletionInstance
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user