Commit Graph

367 Commits

Author SHA1 Message Date
David Ungar
dec78900cd Only use supplementary outputs for first parallel-generated input. 2018-02-15 15:34:55 -07:00
David Ungar
1f9a4f3591 Pass around arguments for primary-specific filenames.
Get rid of IRGenOpts attributes that won’t work for batch mode and also remove fakeNamesStub.
2018-02-15 15:34:55 -07:00
David Ungar
1e32ff31b7 Move SupplementaryOutputPaths to Basic. 2018-02-15 15:32:26 -07:00
David Ungar
ef02d0bfc0 Cleaner handling of cases where action produces no output or where there are no inputs. 2018-02-08 13:22:49 -08:00
David Ungar
ba4f2a84b4 Move supplementary outputs to SupplementaryOutputs in FrontendInputsAndOutputs. 2018-02-07 13:55:32 -08:00
David Ungar
4821e15795 Extract shouldActionOnlyParse. 2018-02-02 20:25:05 -08:00
David Ungar
c396a3a972 Don’t free the ASTContext if > 1 primary input. 2018-02-02 13:49:08 -08:00
David Ungar
6b1d16b68b Move comment to declaration. 2018-02-01 15:20:20 -08:00
David Ungar
614006bc4f Move main outputs to FrontendInputsAndOutputs and InputFile 2018-02-01 11:55:08 -08:00
David Ungar
e006825d88 Move convertBufferNameFromLLVM_getFileOrSTDIN_toSwiftConventions deeper in the call stack. 2018-01-30 18:55:02 -08:00
David Ungar
00da3e81ca Reorder attributes in FrontendInputsAndOutputs 2018-01-30 18:55:01 -08:00
David Ungar
a9819b6e60 Renaming FrontendInputs -> FrontendInputsAndOutputs
Fix comment in ArtsToFrontendOptionsConverter re getOutputFilenamesFromCommandLineOrFilelist
2018-01-30 18:54:38 -08:00
David Ungar
ec2a9573cc Rename FrontendInputs::AllFiles to AllInputs, getAllFiles to getAllInputs, etc. 2018-01-23 14:01:15 -08:00
David Ungar
a70ba0a6cd Split out ArgsToFrontenfOptionsConverter. 2018-01-19 09:51:30 -08:00
David Ungar
68bda74a00 Split out ArgsToFrontendInputsConverter. 2018-01-18 18:36:12 -08:00
David Ungar
361ff7244c Move FrontendInputs into separate .h and .cpp files. 2018-01-18 18:34:57 -08:00
David Ungar
4ac390d24d Move InputFile into a dedicated header. 2018-01-18 14:57:27 -08:00
David Ungar
df02341f16 Remove useless const for getPrimarySourceFiles. 2018-01-17 14:23:32 -08:00
David Ungar
cbd1d481fb Fixed two more \p's. 2018-01-17 13:29:30 -08:00
David Ungar
9528866762 Use \p for parameters in Doxygen comments. 2018-01-17 12:21:00 -08:00
David Ungar
1f8f9947fd Changed PrimarySourceFiles from a SetVector to an ArrayRef. 2018-01-17 12:20:52 -08:00
Graydon Hoare
2494b148f1 [BatchMode] Sink a bunch of FrontendTool uses of getPrimarySourceFile() 2018-01-17 11:57:13 -08:00
Graydon Hoare
b0e5726af9 [BatchMode] Change CompilerInstance::Primary{BufferID,SourceFile} to SetVectors. 2018-01-16 16:17:25 -08:00
David Ungar
9ad0189c43 Remove redundant assertion. 2018-01-16 16:17:25 -08:00
David Ungar
c0b0b5c5da Eliminate InputFile::setBuffer by having SwiftASTManager create new InputFile's with the buffer set or not as needed. 2017-12-12 15:06:26 -08:00
David Ungar
9105284a06 Refactor setUpInputs in CompilerInstance. 2017-12-12 10:14:33 -08:00
David Ungar
a2dca04092 Trivial changes 2017-12-11 22:58:57 -08:00
David Ungar
724d1c36cd Last round of small changes 2017-12-11 17:19:06 -08:00
David Ungar
08e0d11ce3 Add filename non-empty assertions. 2017-12-08 15:03:27 -08:00
David Ungar
068f5019b8 Relocate <stdin> correction to clarify why needed. 2017-12-08 13:16:49 -08:00
David Ungar
60827b4be3 Rename accessors to InputFile data. 2017-12-08 12:57:32 -08:00
David Ungar
6e3829ec96 Rename isInMainMode to isInputSwift 2017-12-08 11:47:33 -08:00
David Ungar
fb93cfd389 Remove defaultable move constructor. 2017-12-06 15:30:03 -08:00
David Ungar
e85bb9a1ab Use llvm_unreachable. 2017-12-06 15:28:52 -08:00
David Ungar
4806c94a6d Rename argument of numberOfPrimaryInputsEndingWith to extension. 2017-12-06 15:28:27 -08:00
David Ungar
995a6c1b2a Rename doAllNonPrimariesEndWIthSIB to areAllNonPrimariesSIB. 2017-12-06 15:27:50 -08:00
David Ungar
d16c91c623 Remove const from return StringRef value. 2017-12-06 15:26:41 -08:00
David Ungar
f8f2f72679 Remove reference for const auto ... begin() 2017-12-06 15:26:00 -08:00
David Ungar
704d7258d1 Rename hasUniqueInput to hasSingleInput. 2017-12-06 15:25:16 -08:00
David Ungar
4c5d5faa63 Fix setup's. 2017-12-06 15:23:39 -08:00
David Ungar
28b206008f FrontendInputs data structure redo.
- Outlaw duplicate input files, fix driver, fix tests, and add test.
- Reflect that no buffer is present without a (possibly pseudo) named file.
- Reflect fact that every input has a (possible pseudo) name.
- Break up CompilerInstance::setup.

Don't bail on dups.
2017-12-05 17:28:03 -08:00
David Ungar
67fc5e32ce Simple changes to pave the way for the next PR.
- Moved getOutputFilenamesFromCommandLineOrFilelist & readOutputFileLIst to better places in the file.
- Capitalization changes.
- Make actionIsImmediate static.
- Add braces around sections of CompilerInstance::setup to clarify scopes of local variables.
2017-12-03 13:56:06 -08:00
David Ungar
df21c6c266 Taking Jordan's suggestions. 2017-12-01 17:39:08 -08:00
David Ungar
ccb73783dc Bug fixes & module name cleanup.
Unify actionHasOutput w/ doesActionProduceOutput & correct both.
Do not set an output filename if there is no output.
Add test to ensure no output is created in immediate mode.

Restore NFC module name computation.
2017-12-01 12:44:32 -08:00
David Ungar
6de07d050c Review fixes:
Rename isThereAPrimaryInputWithAFilenameAt to isInputPrimary.
Remove spurious delayed_function_body_parsing.
Simply return type of getOutputFilenamesFromCommandLineOrFilelist.
2017-11-30 17:28:15 -08:00
David Ungar
04c16cdebd Incorperate advice from review.
Change “have” routines to “has”.
Use more consistent casing.
Remove spurious “DelayedFunctionParsing” option.
Move debugFail routines to top lexical level.
Rename and reorder declaration of functions in FrontendArgsToOptionsConverter.
Move, reword, and doxygenate comments for some of those functions.
Fix casing on some more setUp* functions.
Return NoneAction instead of existing RequestedAction in FrontendArgsToOptionsConverter::determineRequestedAction.
Remove test names and put in FIXME’s.
Remove “Jordan” from comments & reword.
Reorder if-then arms of FrontendArgsToOptionsConverter::computeOutputFilenames for readability.
Test for empty string instead of equality with “”.
Use hasUnusedModuleDocOutputPath.
Remove optionality from return type of getOutputFilenamesFromCommandLineOrFilelist.
Rename isPrimaryInputAFileAt to isThereAPrimaryInputWithAFilenameAt.
Added a FIXME in doesActionProduceOutput to reflect that some actions actually do not produce output.
2017-11-30 17:28:15 -08:00
David Ungar
6d2e3f51e7 Break up ParseFrontendOptions and reorganize module and output files computations. 2017-11-30 17:28:14 -08:00
Arnold Schwaighofer
1a0443040e Revert "Merge pull request #12952 from davidungar/move-in-to-next"
This reverts commit 911140c7e1, reversing
changes made to 5590a2ff91.

This broke the incremental bot.

rdar://35746584
2017-11-29 08:09:42 -08:00
David Ungar
d16ae98e2a Review fixes:
Rename isThereAPrimaryInputWithAFilenameAt to isInputPrimary.
Remove spurious delayed_function_body_parsing.
Simply return type of getOutputFilenamesFromCommandLineOrFilelist.
2017-11-28 13:28:10 -08:00
David Ungar
b4681b154d Incorperate advice from review.
Change “have” routines to “has”.
Use more consistent casing.
Remove spurious “DelayedFunctionParsing” option.
Move debugFail routines to top lexical level.
Rename and reorder declaration of functions in FrontendArgsToOptionsConverter.
Move, reword, and doxygenate comments for some of those functions.
Fix casing on some more setUp* functions.
Return NoneAction instead of existing RequestedAction in FrontendArgsToOptionsConverter::determineRequestedAction.
Remove test names and put in FIXME’s.
Remove “Jordan” from comments & reword.
Reorder if-then arms of FrontendArgsToOptionsConverter::computeOutputFilenames for readability.
Test for empty string instead of equality with “”.
Use hasUnusedModuleDocOutputPath.
Remove optionality from return type of getOutputFilenamesFromCommandLineOrFilelist.
Rename isPrimaryInputAFileAt to isThereAPrimaryInputWithAFilenameAt.
Added a FIXME in doesActionProduceOutput to reflect that some actions actually do not produce output.
2017-11-28 09:21:35 -08:00