NFC: First step (refactoring) towards speeding up compilation by having multiple primary files: Creates new class, FrontendInputs, to encapsulate InputFilenames, InputBuffers, and PrimaryInput, which were formerly in FrontendOptions. Add new instance variable, Inputs, to FrontendOptions in order to hold FrontendInputs.

Encapsulate uses of the variables in FrontendInputs with intention-describing functions. Move some code that sets these variables into FrontendInputs and FrontendOptions classes.

Create new FrontendInputs class to encapsulate InputFilenames, InputBuffers and PrimaryInput, which were formerly in Frontend.

Includes one change in SwiftEditor.cpp to resolve a merge conflict.
This commit is contained in:
David Ungar
2017-10-02 00:00:40 -07:00
parent abd8d937fe
commit c1821755de
16 changed files with 581 additions and 389 deletions

View File

@@ -279,7 +279,7 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
return;
}
if (Invocation.getInputFilenames().empty()) {
if (!Invocation.getFrontendOptions().Inputs.hasInputFilenames()) {
IdxConsumer.failed("no input filenames specified");
return;
}