Commit Graph

776 Commits

Author SHA1 Message Date
Robert Widmann
0e58b7fd14 Plumbing for a Virtual File System
Adds the -vfsoverlay frontend option that enables the user to pass
VFS overlay YAML files to Swift. These files define a (potentially
many-layered) virtual mapping on which we predicate a VFS.

Switch all input-based memory buffer reads in the Frontend to the new
FileSystem-based approach.
2018-07-31 13:16:14 -07:00
swift-ci
f7b8996498 Merge remote-tracking branch 'origin/master' into master-next 2018-07-30 20:59:23 -07:00
Slava Pestov
b15c9d7129 Implement a -dump-type-info frontend action 2018-07-30 18:38:47 -07:00
swift-ci
9711455ad8 Merge remote-tracking branch 'origin/master' into master-next 2018-07-26 14:49:10 -07:00
Jordan Rose
97b152d71e Consistently get extensions from swift/Basic/FileTypes.h (part 2)
Remove the last few literal extension strings from Strings.h in favor
of the file_types APIs, and use those APIs in a few more places.
2018-07-25 22:23:01 -07:00
swift-ci
817e5e80e7 Merge remote-tracking branch 'origin/master' into master-next 2018-07-19 16:49:18 -07:00
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
swift-ci
c4feb3611d Merge remote-tracking branch 'origin/master' into master-next 2018-07-18 17:09:20 -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
swift-ci
e6011356fb Merge remote-tracking branch 'origin/master' into master-next 2018-07-13 14:39:37 -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
swift-ci
27a2e9d09d Merge remote-tracking branch 'origin/master' into master-next 2018-06-27 21:29:27 -07:00
Huon Wilson
8d257c256f [TBD] Validate TBDs in debug compilers for all platforms.
This is generalizing caa3dd4d29 to work even on
non-Apple platforms.

Fixes rdar://problem/40431434.
2018-06-28 14:16:32 +10: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
swift-ci
116de13e22 Merge remote-tracking branch 'origin/master' into master-next 2018-06-22 01:09:58 -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
a770fd8452 Merge remote-tracking branch 'origin/master' into master-next 2018-06-21 01:29:49 -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
swift-ci
9092ac1caf Merge remote-tracking branch 'origin/master' into master-next 2018-06-20 10:10:28 -07:00
Ellis Hoag
c93a5a5776 Add -debug-info-format=[dwarf|codeview] option (#16888) 2018-06-20 09:52:57 -07:00
swift-ci
f71dc72e79 Merge remote-tracking branch 'origin/master' into master-next 2018-06-15 10:09:02 -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
Tony Allevato
88cffc13d3 Update indentation and %swiftc_driver usage. 2018-06-13 10:23:14 -07:00
swift-ci
3950edc9f6 Merge remote-tracking branch 'origin/master' into master-next 2018-06-12 17:49:25 -07:00
David Ungar
20d099d4ce Remove now-unneeded argument from finishProcessing. 2018-06-12 16:37:04 -07:00
Bob Wilson
e1cbc560f9 [master-next] More changes to adapt to new LLVM flags in r334221
My previous change for this issue (033b884de6) did not fix all the
affected code. This gets the rest of them. Thanks for Jason Molenda
for helping with this. rdar://problem/41025365
2018-06-12 14:55:40 -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
ba150e9240 Merge pull request #16786 from huonw/tbdgen
More TBDGen: force-load, conformance witness details, test header clean-up, more purposeful handling of accessors.
2018-05-24 12:37:15 +10:00
Huon Wilson
cfc5abdaa2 [TBDGen] Emit the symbol for autolink-force-load-ing.
Fixes rdar://problem/40356032.
2018-05-23 10:56:49 +10:00
Huon Wilson
38e45c4be5 [TBDGen] Take options as a struct instead of arguments. 2018-05-23 00:02:15 +10:00
David Ungar
df4048c995 Clarify ownership of DepTracker. 2018-05-16 14:37:57 -07:00
David Ungar
21346419ca Add a comment. 2018-05-16 09:52:18 -07:00
David Ungar
524d88e921 Pass SM in finishProcessing 2018-05-12 19:40:09 -07:00
David Ungar
8baef6abd5 WIP backup 2018-05-11 17:28:39 -07:00
David Ungar
70aecfef36 Emit error diagnostic for a primary if all errors suppressed 2018-05-11 15:14:42 -07:00
David Ungar
aa2f2eb239 Call forEachNonPrimaryInput directly instead of providing useless semantics for forEachInputNotProducingSupplementaryOutput. 2018-05-10 14:20:49 -07:00
David Ungar
4a194a924b If type-checking in batch mode with no errors, don’t crash on outputting unneeded ObjCHeader. 2018-05-09 19:19:04 -07:00
David Ungar
02fcbf7226 optional pointer to consumer replaces NullDiagnosticConsumer placeholder 2018-05-09 18:09:40 -07:00
Jordan Rose
a214f0b39b Fix call to llvm::opt::OptionTable::PrintHelp (#16269)
The signature here changed, but the old arguments implicitly converted
to the parameter types for the wrong overload, so we didn't notice.
Add a simple test that would have at least caught this for the driver.
2018-05-02 16:54:10 -07:00
Slava Pestov
81cf1d951d SIL: Remove -sil-link-all frontend flag
It was only used in a few tests. Those tests now use -emit-sil instead
of -emit-silgen, with some functions marked @_transparent and a few
CHECK: lines changed now that the mandatory optimizations get to run.
2018-04-09 13:27:52 -07:00
Slava Pestov
cc586594d1 SIL: Remove unnecessary performSILLinking() calls from immediate mode and REPL 2018-04-09 13:27:07 -07:00
Robert Widmann
d61553efc1 [SR-7342] Teach EmitImportedModules action to evaluate conditional compilation blocks 2018-04-04 17:46:33 -04:00