mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #40645 from rintaro/sourcekit-compilerserver
[SourceKit] Add a request to generate object files in SourceKit
This commit is contained in:
@@ -705,7 +705,7 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
|
||||
int &ReturnValue,
|
||||
FrontendObserver *observer);
|
||||
|
||||
static bool performCompileStepsPostSema(CompilerInstance &Instance,
|
||||
bool swift::performCompileStepsPostSema(CompilerInstance &Instance,
|
||||
int &ReturnValue,
|
||||
FrontendObserver *observer) {
|
||||
const auto &Invocation = Instance.getInvocation();
|
||||
@@ -1436,6 +1436,14 @@ static void freeASTContextIfPossible(CompilerInstance &Instance) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If this instance is used for multiple compilations, we need the ASTContext
|
||||
// to live.
|
||||
if (Instance.getInvocation()
|
||||
.getFrontendOptions()
|
||||
.ReuseFrontendForMutipleCompilations) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto &opts = Instance.getInvocation().getFrontendOptions();
|
||||
|
||||
// If there are multiple primary inputs it is too soon to free
|
||||
|
||||
Reference in New Issue
Block a user