mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Explicitly specify frontend action type when creating compiler invocation
Explicitly specify the frontend action to make sure we aren’t loading thes stdlib if the performed action is syntactic only.
This commit is contained in:
@@ -1043,8 +1043,8 @@ void SwiftLangSupport::performWithParamsToCompletionLikeOperation(
|
||||
CompilerInvocation Invocation;
|
||||
std::string CompilerInvocationError;
|
||||
bool CreatingInvocationFailed = getASTManager()->initCompilerInvocation(
|
||||
Invocation, Args, Diags, newBuffer->getBufferIdentifier(), FileSystem,
|
||||
CompilerInvocationError);
|
||||
Invocation, Args, FrontendOptions::ActionType::Typecheck, Diags,
|
||||
newBuffer->getBufferIdentifier(), FileSystem, CompilerInvocationError);
|
||||
if (CreatingInvocationFailed) {
|
||||
PerformOperation(CancellableResult<CompletionLikeOperationParams>::failure(
|
||||
CompilerInvocationError));
|
||||
|
||||
Reference in New Issue
Block a user