mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swap InputFileKind for ParseInputMode
Tying InputFile to this option meant that every input that was not one of the explictly-blessed kinds was modeled as a Swift file. With the new InputFile that infers file kinds, we no longer need CompilerInvocation::setInputKind
This commit is contained in:
@@ -850,7 +850,6 @@ static bool makeParserAST(CompilerInstance &CI, StringRef Text,
|
||||
CompilerInvocation Invocation) {
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.clearInputs();
|
||||
Invocation.setModuleName("main");
|
||||
Invocation.setInputKind(InputFileKind::Swift);
|
||||
Invocation.getLangOptions().DisablePoundIfEvaluation = true;
|
||||
|
||||
std::unique_ptr<llvm::MemoryBuffer> Buf;
|
||||
@@ -1440,7 +1439,6 @@ SourceFile *SwiftLangSupport::getSyntacticSourceFile(
|
||||
Error = "Compiler invocation init failed";
|
||||
return nullptr;
|
||||
}
|
||||
Invocation.setInputKind(InputFileKind::Swift);
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.addInput(
|
||||
InputFile(InputBuf->getBufferIdentifier(), /*isPrimary*/false, InputBuf,
|
||||
file_types::TY_Swift));
|
||||
|
||||
Reference in New Issue
Block a user