mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #14198 from davidungar/PR-18-3c-exp2
[Batch mode] Move frontend main output files to FrontendInputsAndOutputs. (1)
This commit is contained in:
@@ -773,13 +773,13 @@ private:
|
||||
|
||||
static bool makeParserAST(CompilerInstance &CI, StringRef Text,
|
||||
CompilerInvocation Invocation) {
|
||||
Invocation.getFrontendOptions().Inputs.clearInputs();
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.clearInputs();
|
||||
Invocation.setModuleName("main");
|
||||
Invocation.setInputKind(InputFileKind::IFK_Swift);
|
||||
|
||||
std::unique_ptr<llvm::MemoryBuffer> Buf;
|
||||
Buf = llvm::MemoryBuffer::getMemBuffer(Text, "<module-interface>");
|
||||
Invocation.getFrontendOptions().Inputs.addInput(
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.addInput(
|
||||
InputFile(Buf.get()->getBufferIdentifier(), false, Buf.get()));
|
||||
if (CI.setup(Invocation))
|
||||
return true;
|
||||
@@ -1094,7 +1094,7 @@ static bool reportSourceDocInfo(CompilerInvocation Invocation,
|
||||
|
||||
EditorDiagConsumer DiagConsumer;
|
||||
CI.addDiagnosticConsumer(&DiagConsumer);
|
||||
Invocation.getFrontendOptions().Inputs.addInput(
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.addInput(
|
||||
InputFile(InputBuf->getBufferIdentifier(), false, InputBuf));
|
||||
if (CI.setup(Invocation))
|
||||
return true;
|
||||
@@ -1367,7 +1367,7 @@ SourceFile *SwiftLangSupport::getSyntacticSourceFile(
|
||||
return nullptr;
|
||||
}
|
||||
Invocation.setInputKind(InputFileKind::IFK_Swift);
|
||||
Invocation.getFrontendOptions().Inputs.addInput(
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.addInput(
|
||||
InputFile(InputBuf->getBufferIdentifier(), false, InputBuf));
|
||||
|
||||
if (ParseCI.setup(Invocation)) {
|
||||
@@ -1443,7 +1443,7 @@ findModuleGroups(StringRef ModuleName, ArrayRef<const char *> Args,
|
||||
StringRef Error)> Receiver) {
|
||||
CompilerInvocation Invocation;
|
||||
Invocation.getClangImporterOptions().ImportForwardDeclarations = true;
|
||||
Invocation.getFrontendOptions().Inputs.clearInputs();
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.clearInputs();
|
||||
|
||||
CompilerInstance CI;
|
||||
// Display diagnostics to stderr.
|
||||
|
||||
Reference in New Issue
Block a user