Commit Graph

199 Commits

Author SHA1 Message Date
Robert Widmann
d845112695 Add -track-system-dependencies Flag
Add a flag to configure the behavior of the Clang Importer's dependency tracker with respect to system dependencies.
2018-07-19 13:03:30 -07:00
Robert Widmann
2282065197 Rename "Name Binding" action to "Resolve Imports" 2018-07-13 11:00:48 -07:00
Robert Widmann
cb1e9dd821 Introduce Name Binding as a Frontend Action
Introduces the -name-bind frontend action that is intended as an intermediary between the parse-only actions and a full typechecking pass.  In this phase, module imports will be validated and resolved, making it possible to emit full make-style dependencies files among other things.

Note that all information available to a parse-only pass is available to name binding, but because it does not continue-on to typecheck input files, full semantic information is not.
2018-07-13 10:56:03 -07:00
Ellis Hoag
c93a5a5776 Add -debug-info-format=[dwarf|codeview] option (#16888) 2018-06-20 09:52:57 -07:00
Alex Hoppen
de9737c946 [incrParse] Support incremental parsing for edited files 2018-05-22 08:52:33 -07:00
David Ungar
df4048c995 Clarify ownership of DepTracker. 2018-05-16 14:37:57 -07:00
Jordan Rose
6243096b0b Dump input filelists in the PrettyStackTrace
This may help us reproduce a failing build when all we have is a build
log, and will become much more important in batch mode when we
/really/ need to know what ended up in what batch.

For now, this doesn't include /output/ filelists, because David's
about to mess with that code anyway to make things better around
supplementary outputs in batch mode. There is one weirdness there,
though, which is that ArgsToFrontendInputsConverter peeks at the
outputs to see whether we're doing single-threaded or multi-threaded
WMO.
2018-03-09 18:32:02 -08:00
David Ungar
4866df6dfd Move SupplementaryOutputs into each InputFile. 2018-02-28 09:41:49 -08:00
Jordan Rose
098a1c98f8 Stop importing SILModule.h in Frontend.h
...for no other reason than to slightly improve compile times
when something changes in SILModule.h or SILFunction.h.
2018-02-20 17:50:50 -08:00
David Ungar
488db9fb9b Fix ReferencedNameTracker in preparation for batch mode. 2018-02-16 22:28:10 -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
ba4f2a84b4 Move supplementary outputs to SupplementaryOutputs in FrontendInputsAndOutputs. 2018-02-07 13:55:32 -08:00
David Ungar
c396a3a972 Don’t free the ASTContext if > 1 primary input. 2018-02-02 13:49:08 -08:00
David Ungar
614006bc4f Move main outputs to FrontendInputsAndOutputs and InputFile 2018-02-01 11:55:08 -08:00
David Ungar
a9819b6e60 Renaming FrontendInputs -> FrontendInputsAndOutputs
Fix comment in ArtsToFrontendOptionsConverter re getOutputFilenamesFromCommandLineOrFilelist
2018-01-30 18:54:38 -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
9105284a06 Refactor setUpInputs in CompilerInstance. 2017-12-12 10:14:33 -08:00
David Ungar
724d1c36cd Last round of small changes 2017-12-11 17:19:06 -08:00
David Ungar
6e3829ec96 Rename isInMainMode to isInputSwift 2017-12-08 11:47:33 -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
83ee8cb7f0 Merge pull request #12920 from davidungar/Move-input-conversion
Move input conversion
2017-11-27 17:13:48 -08:00
David Ungar
0b39a883c2 Fix capitalization of setUpForFileAt 2017-11-21 09:48:55 -08:00
Slava Pestov
076d5ee242 Frontend: Remove -delayed-function-body-parsing flag 2017-11-18 11:31:19 -05:00
Slava Pestov
957427fbfc Frontend: Rework delayed parsing mode a bit 2017-11-18 11:08:18 -05:00
David Ungar
ad217f7ce6 Fix StringRef parameter declaration. 2017-11-14 20:54:43 -08:00
David Ungar
3f3d784144 Factor code from tools & move input conversion. 2017-11-14 20:48:59 -08:00
David Ungar
a406d3ae3f Factor common code out of tools into CompilerInvocation::setUpInputForSILTool. 2017-11-14 20:31:53 -08:00
David Ungar
47ee930a50 git-clang-format'ed 2017-10-08 23:56:03 -07:00
David Ungar
c1821755de 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.
2017-10-08 10:20:37 -07:00
David Ungar
42b04a8a9b Merged checkTypesWhileParsingMain into its caller. 2017-09-19 16:57:45 -07:00
David Ungar
fef5551fdb Added consts to implicitImports refs & fixed dangling new in computeDelayedParsingCallback.
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-19 16:57:45 -07:00
David Ungar
3d2484af28 git-clang-format
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-18 14:02:50 -07:00
David Ungar
4653c92e25 Renamed finishTypeCheckingMainModule to finishTypeChecking
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-18 14:01:57 -07:00
David Ungar
01c54fe13d git-clang-format 2017-09-14 16:58:06 -07:00
David Ungar
cb80010216 Jordan's comments
Use function_ref
Rename generateOutputForTheWholeModule
Constify createRELPFile
Rename typeCheckMainModule
Move shouldImportSwiftOnoneModule
Rename timer in performTypeChecking
2017-09-14 16:58:06 -07:00
David Ungar
ba536b1fc7 format 2017-09-14 16:58:06 -07:00
David Ungar
7b7c62917d Abstract forEachFileToTypeCheck
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-14 16:58:05 -07:00
David Ungar
3839697201 format 2017-09-14 16:56:32 -07:00
David Ungar
da79632eaf Pull out parseAndCheckTypes
They were the only computations using PersistentState and DeclayedCB
2017-09-14 16:56:32 -07:00
David Ungar
e797092dbf Moved comment, removed & from a StringRef 2017-09-14 16:56:31 -07:00
David Ungar
37215e1bb0 Formatted 2017-09-14 16:56:31 -07:00
David Ungar
33aa6eb066 Change 'typeCheckEveryFileInMainModule' to 'typeCheckEveryFile'
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-14 16:56:31 -07:00
David Ungar
042800c6e1 Remove 'const' in 'const OptionSet'
# Conflicts:
#	lib/Frontend/Frontend.cpp
2017-09-14 16:55:21 -07:00