mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Hold CompletionInstance with std::shared_ptr
So we can pin it on the threads.
This commit is contained in:
@@ -172,7 +172,10 @@ static bool swiftCodeCompleteImpl(
|
||||
Error = "no input filenames specified";
|
||||
return false;
|
||||
}
|
||||
CompilerInstance *CI = Lang.getCompletionInstance().getCompilerInstance(
|
||||
|
||||
// Pin completion instance.
|
||||
auto CompletionInst = Lang.getCompletionInstance();
|
||||
CompilerInstance *CI = CompletionInst->getCompilerInstance(
|
||||
Invocation, FileSystem, newBuffer.get(), Offset, Error, &CIDiags);
|
||||
if (!CI)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user