Commit Graph

567 Commits

Author SHA1 Message Date
Karoy Lorentey
1c9b0908e6 Merge remote-tracking branch 'origin/master-next'
# Conflicts:
#	include/swift/Frontend/FrontendInputsAndOutputs.h
2020-06-08 16:43:40 -07:00
Hamish Knight
1ed810653c [Frontend] Remove performParseOnly
Most clients were only using it to populate the
main module with files, which is now done by
`getMainModule`. Instead, they can now just rely
on parsing happening lazily.
2020-06-08 12:44:15 -07:00
Hamish Knight
7824dc1048 [Frontend] Move parse-only module load assert
Move into `performEndOfPipelineActions`, and move
the call up a bit in `performCompile` to make sure
it gets called even for a parse-only invocation.

Unfortunately this requires carving out an
exception for `-emit-imported-modules`, which can
load modules.
2020-06-08 12:44:15 -07:00
Hamish Knight
5d72c464eb [Frontend] Remove parsing option params from performParseOnly
Lift the `DisablePoundIfEvaluation` parsing option
into `LangOptions` to subsume the need for the
`EvaluateConditionals` parameter, and sink the
computation of `CanDelayBodies` down into
`createSourceFileForMainModule`.
2020-06-08 12:44:13 -07:00
Robert Widmann
b996a21d08 Merge pull request #32196 from ladd/levantol/perf-patch-d-files
Build dependency list once
2020-06-05 10:58:00 -07:00
Ladd Van Tol
b8abe55bc5 Build dependency list once
Remove changed lines
2020-06-04 15:34:30 -07:00
Xi Ge
28b0b22a42 ModuleInterface: refactor several configuration values into an Option struct 2020-06-02 16:51:45 -07:00
Xi Ge
3a214d99f6 Frontend: add an argument to disable implicitly built Swift modules 2020-06-02 16:51:45 -07:00
Hamish Knight
ab6c15f4b3 [Frontend] Bail early if the stdlib is missing
Rather than trying to continue the compilation
with an empty main module, let's bail out early if
we expect an implicit stdlib import and fail to
load in the stdlib.
2020-05-29 16:13:42 -07:00
swift_jenkins
b84e995326 Merge remote-tracking branch 'origin/master' into master-next 2020-05-28 16:38:52 -07:00
Hamish Knight
f43a15e336 Merge pull request #31983 from hamishknight/import-regulations 2020-05-28 16:29:51 -07:00
Hamish Knight
16c326eed3 [Frontend] Re-enable imported AST verification
The reasons for disabling it appear to now be
outdated. Re-enable it, and run it after the
entire pipeline has finished to make sure we
verify any decls deserialised during SIL/IRGen.
2020-05-28 11:32:11 -07:00
Hamish Knight
c6de4fafed [Frontend] Factor out performEndOfPipelineActions 2020-05-28 11:32:10 -07:00
swift_jenkins
9f94387751 Merge remote-tracking branch 'origin/master' into master-next 2020-05-28 09:18:46 -07:00
Erik Eckstein
266bd0fd87 Cross-module-optimization: issue an error if TBD file generation is requested with CMO
This combination is not supported and may result in undefined-symbol linker errors.

rdar://problem/63238999
2020-05-28 15:33:50 +02:00
swift_jenkins
0b2d4f6963 Merge remote-tracking branch 'origin/master' into master-next 2020-05-27 20:38:47 -07:00
Owen Voorhees
e40e86fc94 Merge pull request #32017 from owenv/diag-style-opt
[Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output
2020-05-27 20:22:23 -07:00
swift_jenkins
35191fe8b9 Merge remote-tracking branch 'origin/master' into master-next 2020-05-27 18:58:55 -07:00
Hamish Knight
bccdc0e062 NFC: Rename performSILGeneration -> performASTLowering
And also rename the underlying request and
descriptor.

This rename is motivated by the fact that the
operation may instead perform parsing of SIL files
and/or deserialization of SIB files.
2020-05-27 09:36:11 -07:00
swift_jenkins
69b940a8d3 Merge remote-tracking branch 'origin/master' into master-next 2020-05-22 20:58:53 -07:00
Robert Widmann
acbf927b0e [NFC] Delete ReferencedNameTracker 2020-05-21 18:54:14 -07:00
Owen Voorhees
c4e67e29ed [Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output
This default formatting style remains the same "LLVM style". "Swift style"
is what was previously enabled via -enable-experimental-diagnostic-formatting
2020-05-20 19:34:15 -05:00
swift_jenkins
10e1981971 Merge remote-tracking branch 'origin/master' into master-next 2020-05-13 13:37:47 -07:00
Robert Widmann
d82880a274 Merge pull request #31721 from CodaFi/const-of-proportionality
Const-Qualify LangOptions and TypeCheckerOptions
2020-05-13 13:36:15 -07:00
swift_jenkins
0fbb11da7a Merge remote-tracking branch 'origin/master' into master-next 2020-05-13 11:17:46 -07:00
Robert Widmann
eac92e3df0 [NFC] Const-Qualify LangOptions Accesses Through ASTContext 2020-05-13 09:13:44 -07:00
Slava Pestov
a301808144 Frontend: Go back to emitting index data after IRGen
There's no longer a technical reason to do this, but it helps
with crash analytics because AST crashes are less likely to
end up happening during index emission.
2020-05-13 00:27:54 -04:00
Arnold Schwaighofer
e12698d7a0 Merge remote-tracking branch 'origin/master' into master-next 2020-05-08 07:22:20 -07:00
Hamish Knight
98d3a81ede Merge pull request #31609 from hamishknight/ill-sil-you-in-later 2020-05-07 18:02:52 -07:00
swift_jenkins
8069dd1be9 Merge remote-tracking branch 'origin/master' into master-next 2020-05-07 08:20:47 -07:00
Hamish Knight
70abfd3252 [Frontend] Remove TheSILModule
Now that SIL parsing is handled lazily, the
CompilerInstance no longer needs to hang onto a
SILModule.
2020-05-06 20:11:49 -07:00
Hamish Knight
11d8f70dec Trigger SIL parsing from performSILGeneration
Rather than eagerly parsing an input .sil file
in `performSemaUpTo`, trigger it from
`performSILGeneration`. This will allow us to
remove the SILModule stored on the
CompilerInstance and will eventually allow the
various SIL tools to just call into
`performSILGeneration` without needing to call
`performSema`.
2020-05-06 20:11:48 -07:00
Slava Pestov
dd0ce1ad13 Remove the integrated REPL 2020-05-06 22:29:05 -04:00
swift_jenkins
d4f39f3eaa Merge remote-tracking branch 'origin/master' into master-next 2020-05-06 19:26:08 -07:00
Slava Pestov
5b6aa8d3d1 Frontend: Emit reference dependencies at the end of the frontend pipeline
As part of eliminating cascading dependencies, we need to make sure to
capture any dependencies discovered during SILGen and IRGen.

This is a little bit tricky because we exit early in various places in
the pipeline, so we want to do it after performCompileStepsPostSema()
returns, but we can't do it too late, because the ASTContext might
already have been deallocated.

So emit the dependencies manually before freeing the ASTContext if we
decide to do that, or just do it before returning from performCompile()
using a SWIFT_DEFER otherwise.

This should have no observable effect until we start recording dependencies
for lookups done on behalf of declarations in secondary files.
2020-05-06 18:42:37 -04:00
swift_jenkins
2af7cfcffe Merge remote-tracking branch 'origin/master' into master-next 2020-05-05 16:18:50 -07:00
Robert Widmann
b06211eac4 Initial plumbing for private dependencies
Add a mode bit to the dependency collector that respects the frontend flag in the previous commit.

Notably, we now write over the dependency files at the end of the compiler pipeline when this flag is on so that dependency from SILGen and IRGen are properly written to disk.
2020-05-05 13:48:25 -07:00
Robert Widmann
a082e9de26 [Gardening] Use the CompilerInstance's DiagnosticEngine
This keeps us honest about the const-ness of the CompilerInstance itself: emitting diagnostics is a transitively mutating operation.
2020-05-05 12:56:59 -07:00
swift_jenkins
9b6f01b6d9 Merge remote-tracking branch 'origin/master' into master-next 2020-04-30 20:37:34 -07:00
Daniel Sweeney
ea526c6383 Converting ModuleDecl::ImportedModule from std::pair to a dedicated struct. (#31360) 2020-04-30 20:26:03 -07:00
swift_jenkins
2fb0e14746 Merge remote-tracking branch 'origin/master' into master-next 2020-04-29 21:48:41 -07:00
Hamish Knight
f7ae7c0459 [Frontend] Avoid passing CompilerInvocation + CompilerInstance
The invocation can be retrieved from the
CompilerInstance.
2020-04-29 18:58:47 -07:00
swift_jenkins
4dc2e3c785 Merge remote-tracking branch 'origin/master' into master-next 2020-04-29 17:59:15 -07:00
Slava Pestov
fd9ffe70d8 Frontend: Write out index before SILGen
This cleans things up somewhat.

Fixes <rdar://problem/30433353>.
2020-04-29 19:20:40 -04:00
Slava Pestov
368d47429d Frontend: Remove coarse-grained dependency graph implementation 2020-04-29 16:55:53 -04:00
swift_jenkins
34a33d9972 Merge remote-tracking branch 'origin/master' into master-next 2020-04-25 09:58:23 -07:00
Saleem Abdulrasool
618ced846b Merge pull request #31310 from compnerd/unreachable
sprinkle some `llvm_unreachable` for MSVC (NFC)
2020-04-25 09:44:39 -07:00
swift_jenkins
ed20b9c058 Merge remote-tracking branch 'origin/master' into master-next 2020-04-24 23:58:13 -07:00
Saleem Abdulrasool
fa46f7131c sprinkle some llvm_unreachable for MSVC (NFC)
MSVC does not realize that the switch is exhaustive and requires that
the path is explicitly marked as unreachable.  This silences the C4715
warning ("not all control paths return a value").
2020-04-24 18:59:07 -07:00
Doug Gregor
71e7d6a913 [Dependency scanning] Add implicit Swift and SwiftOnoneSupport dependencies 2020-04-24 12:58:45 -07:00