Commit Graph

317 Commits

Author SHA1 Message Date
Huon Wilson
103170bcbb Merge pull request #17688 from huonw/merging-tbd
Allow TBD files to be generated in non-wmo mode
2018-07-20 09:44:50 +10:00
Robert Widmann
79b38ba6f3 Merge pull request #18083 from CodaFi/system-of-a-down
Add -track-system-dependencies Flag
2018-07-19 16:29:50 -07:00
Huon Wilson
2e3e6558b7 [Driver] Pass -emit-tbd through to -frontend -merge-modules, to get TBD files without -wmo.
Fixes rdar://problem/33735706
2018-07-20 08:12:22 +10:00
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
Alex Hoppen
1df1dc71b7 Merge pull request #18016 from ahoppen/003-incremental-syntax-coloring
[libSyntax] Incremental syntax colouring
2018-07-18 17:08:02 -07:00
Alex Hoppen
6635be10ea [libSyntax] Add UserInfo to json::Output
This will allow us to customize the serialization of a syntax tree like
not serializing the node's IDs.
2018-07-18 13:35:10 -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
Slava Pestov
45fb11ce3c AST: Add ExistentialLayout::getSuperclass(), rename superclass to explicitSuperclass
More groundwork for protocols with superclass constraints.
In several places we need to distinguish between existential
types that have a superclass term (MyClass & Proto) and
existential types containing a protocol with a superclass
constraint.

This is similar to how I can write 'AnyObject & Proto', or
write 'Proto1 & Proto2' where Proto1 has an ': AnyObject'
in its inheritance clause.

Note that some of the usages will be revisited later as
I do more refactoring and testing. This is just a first pass.
2018-07-02 22:06:33 -07:00
Huon Wilson
0c4fe6cef2 Merge pull request #16838 from huonw/validate-tbd-by-default
[Frontend] Turn symbols-missing-from-TBD validation on by default in debug builds on Apple platforms.
2018-06-28 14:11:09 +10:00
Huon Wilson
caa3dd4d29 [Frontend] Turn symbols-missing-from-TBD validation on by default in debug builds on Apple platforms.
TBD validation is effectively an expensive assertion, and is currently only
tuned for Apple platforms. However, we don't want it to regress more, and it
would be nice to start getting validation from people using master
snapshots. Together, this means that turning it on by default for the cases
mentioned above is an appropriate course of action.

At the very least, this has the benefit of running validation across the stdlib,
the overlays and the whole testsuite on each build, so people making changes to
the compiler that change symbols are hopefully alerted.

One limitation here is that this is only validating that the TBD is a superset
of the true set of symbols: it could include spurious symbols that aren't
actually in the binary. This case is less problematic for Swift than symbols
missing from the TBD file, and so we've focused energy on this. Once we've fixed
the extra-symbols problems and are confident in it, this validation can be
upgraded to validate that too.

Half of rdar://problem/40431434.
2018-06-28 10:34:45 +10:00
David Ungar
794a3d748d Merge pull request #16669 from davidungar/refdep-refactor
NFC, [Incremental Compilation] Refactor ReferenceDependencies
2018-06-22 10:14:36 -07:00
swift-ci
846e1cb880 Merge pull request #17420 from DougGregor/evaluator-stats-reporting 2018-06-22 00:56:08 -07:00
Doug Gregor
197642d37b [Request-evaluator] Track # of evaluations for each request kind.
Using the unified stats reporter, track the # of evaluations for each
type checking request kind.
2018-06-22 00:01:55 -07:00
swift-ci
0af9976963 Merge pull request #17391 from DougGregor/output-request-graphviz 2018-06-21 01:10:30 -07:00
Doug Gregor
b6c5830277 [Request-evaluator] Add GraphViz output option -output-request-graphviz.
Introduce a command-line option to visualize the complete set of output
request dependencies evaluated by a particular compile action. This is
exposing existing visualization facilities to the (-frontend) command line.
2018-06-21 00:23:50 -07:00
Ellis Hoag
c93a5a5776 Add -debug-info-format=[dwarf|codeview] option (#16888) 2018-06-20 09:52:57 -07:00
David Ungar
8c2f733152 Address review comments. 2018-06-15 14:29:30 -07:00
David Ungar
43cad63742 clang-format 2018-06-15 11:18:16 -07:00
David Ungar
f626396f6d Doxygenation. 2018-06-15 11:15:22 -07:00
David Ungar
37289f9bb3 Rename CollectedProvidedDeclarations to CollectedDeclarations 2018-06-15 11:15:22 -07:00
David Ungar
42576ab0d4 Constify argument to findNominalsAndOperators 2018-06-15 11:15:22 -07:00
David Ungar
a9d7ef18e1 Centralize string constants. 2018-06-15 11:15:22 -07:00
David Ungar
35fab64bac Move outputing provides-top-level. 2018-06-15 11:15:22 -07:00
David Ungar
50c725e0bc Preparing ReferenceDependencies for centralizing strings. 2018-06-15 11:15:22 -07:00
David Ungar
4c4e25f3d2 Added consts where helpful and deleted where not. 2018-06-15 11:15:22 -07:00
David Ungar
617b506dd4 const WIP 2018-06-15 11:15:22 -07:00
David Ungar
41f75ab324 Move helpers into the classes that use them. 2018-06-15 11:15:22 -07:00
David Ungar
44af96dc6d Reorder functions to group members together. 2018-06-15 11:15:22 -07:00
David Ungar
cac9a9a907 Move class declarations to top of file, put CollectedProvidedDeclarations inside of ProvidesEmitter. 2018-06-15 11:15:22 -07:00
David Ungar
1f7c920854 Rename TableEntryTy per Jordan's advice. 2018-06-15 11:15:22 -07:00
David Ungar
11aa1f15bc Shorted names of member fns of DependsEmitter. 2018-06-15 11:12:25 -07:00
David Ungar
d0affb24ad Wrap depends emitters in a class. 2018-06-15 11:12:25 -07:00
David Ungar
16a1299f90 Move provides emitters into a class 2018-06-15 11:12:25 -07:00
David Ungar
5477b3987a Aggregate the provided declatations into CollectedProvidedDeclarations. 2018-06-15 11:12:25 -07:00
David Ungar
c8130663d5 Move top-level emitting into a class, ReferenceDependenciesEmitter. 2018-06-15 11:12:25 -07:00
David Ungar
ebf8713c08 Break up emitReferenceDependencies to separate the file opening from emitting to a stream. 2018-06-15 11:12:25 -07:00
David Ungar
70005c10e5 Factor out file openning & error handling. 2018-06-15 11:12:25 -07:00
David Ungar
fe8ac4b2b2 Per Jordan, use raw_ostream instead of raw_fd_ostream. 2018-06-15 11:12:25 -07:00
David Ungar
44e5cd3bba clang-format 2018-06-15 11:12:25 -07:00
David Ungar
abe7544c1a Subdivide emitting a provides decl. 2018-06-15 11:12:25 -07:00
David Ungar
d53122f03a clang-format 2018-06-15 11:12:25 -07:00
David Ungar
c4172183f0 Subdivide one more level down. 2018-06-15 11:12:25 -07:00
David Ungar
45c562b8e5 Split up emitReferenceDependencies into 3 steps: provides, depends, interfaceHash. 2018-06-15 11:12:25 -07:00
Jordan Rose
8d43ec3ad7 Merge pull request #17087 from allevato/dwarf-command-line-flags
Make DWARF debug flag behavior match Clang.
2018-06-15 09:52:26 -07:00
Slava Pestov
181d7a2eac FrontendTool: Deterministic order when a normal declname has same spelling as special declname 2018-06-14 20:41:27 -07:00
Tony Allevato
88cffc13d3 Update indentation and %swiftc_driver usage. 2018-06-13 10:23:14 -07:00
David Ungar
20d099d4ce Remove now-unneeded argument from finishProcessing. 2018-06-12 16:37:04 -07:00
Tony Allevato
22ac700154 Make DWARF debug flag behavior match Clang.
Only write the compilation flags to debug info for Mach-O targets, and only
if the RC_DEBUG_OPTIONS environment variable is set.
2018-06-09 20:05:06 -07:00
Huon Wilson
4c2f5294de [Frontend] Add a more descriptive error for a TBD validation failure. 2018-05-25 20:13:06 +10:00