Commit Graph

685 Commits

Author SHA1 Message Date
David Ungar
b82694c307 Format 2019-01-30 17:19:56 -08:00
David Ungar
2f65ac3735 Cosmetic cleanups 2019-01-30 17:16:49 -08:00
David Ungar
3d8779efba Fix print bugs unfmt 2019-01-26 21:47:52 -08:00
David Ungar
b520b242dc Collapsed lots of changes. 2019-01-24 18:46:49 -08:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Vinicius Vendramini
e1a968c05c Send OPT_dump_ast closer to other similar options. 2018-11-14 13:38:01 -02:00
Vinicius Vendramini
e123750c12 Add option to dump AST to files
This adds two things:
- Calling `swiftc -dump-ast foo.swift [...] -o foo.ast` will dump the AST to the file `foo.ast`, instead of dumping it to `stderr` as usual.
- Calling `swiftc -dump-ast -output-file-map=outputFileMap.json *.swift [...]`, given an `outputFileMap.json` file that contains entries in the form `"ast-dump": "foo.ast"`, will dump the ASTs of the input files to their respective output files in the file map.

This should serve as a valid workaround to a bug mentioned in [the forums](https://forums.swift.org/t/error-when-dumping-the-ast-for-hundreds-of-files/17578) where the AST dump functionality crashes when called with too many input files. A few implementation details were also discussed in the same forum post.

As an aside, this also fixes a comment in `include/swift/Basic/PrimarySpecificPaths.h` that was incorrect.
2018-11-14 13:38:01 -02:00
Dave Lee
0829b8a4b5 [Driver] Remove unused OutputFileMap param (#20349) 2018-11-06 10:45:17 -08:00
Graydon Hoare
4938b002b4 [ModuleInterface] Remove SwiftParseableInterfaceDeps files, use INPUT_BLOCK. 2018-11-01 10:51:16 -07:00
David Ungar
1f4dfce598 Add -enable-experimental-dependencies and push it through. 2018-10-28 00:39:36 -07:00
Graydon Hoare
dc006e883a [ModuleInterface] Add new SwiftParseableInterfaceDeps file type (.sid). 2018-10-18 00:31:24 -07:00
Graydon Hoare
4f315363f8 [ModuleInterface] Change TY_SwiftModuleInterfaceFile to TY_SwiftParseableInterfaceFile 2018-10-11 23:56:19 -07:00
Graydon Hoare
0f26b9c12d [Driver] <rdar://43955209> Remove obsolete/fragile batch mode 'repartitioning' code. 2018-10-09 13:31:41 -07:00
Jordan Rose
45557ee2f6 [Driver] Disallow emitting swiftinterfaces with bridging headers
There's no place to put the bridging header in a swiftinterface, and
they don't make sense with the intended use case of distribution.
Just disallow it up front.

rdar://problem/44113493
2018-10-04 18:02:09 -07:00
Jordan Rose
c38fcc1e96 [Driver] Expose -emit-parseable-module-interface[-path]
Commit to a command line option spelling so that build systems can
start testing it. I deliberately picked one of the longer names we
were considering because we can always decide to add a shorter alias,
but can't decide a shorter name was too generic.

Like the other supplementary output flags,
-emit-parseable-module-interface-path will emit a .swiftinterface file
to a particular path, while -emit-parseable-module-interface will put
it next to the main output (the one specified with -o).

rdar://problem/43776945
2018-10-04 17:50:04 -07:00
Jordan Rose
73d5ebaad2 Rename "textual interface" to "parseable interface" (#19713)
We already have something called "module interfaces" -- it's the
generated interface view that you can see in Xcode, the interface
that's meant for developers using a library. Of course, that's also a
textual format. To reduce confusion, rename the new module stability
feature to "parseable [module] interfaces".
2018-10-04 17:49:55 -07:00
Jordan Rose
ac4a92a968 Merge pull request #19292 from jrose-apple/get-out-the-map
Minor improvements to the use of StringMap/StringSet
2018-09-14 10:52:59 -07:00
Saleem Abdulrasool
4baa775726 Merge pull request #19297 from compnerd/unreachable
litter the tree with `llvm_unreachable`
2018-09-14 09:04:56 -07:00
Graydon Hoare
5a563f59af [Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere. 2018-09-13 16:15:49 -07:00
Saleem Abdulrasool
d281b98220 litter the tree with llvm_unreachable
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value.  This makes the output more readable and less
likely to lose useful warnings.  NFC.
2018-09-13 15:26:14 -07:00
Jordan Rose
71760bcc4e Replace StringMap with DenseMap when the keys don't need to be owned
StringMap always copies its strings into its own storage. A DenseMap
of StringRefs has the same caveats as any other use of StringRef, but
in the cases I've changed the string has very clear ownership that
outlives the map.

No functionality change, but should reduce memory usage and malloc
traffic a little.
2018-09-13 15:15:27 -07:00
Jordan Rose
6ffe644cfc Merge pull request #18973 from jrose-apple/interfacepalm
Generate swiftinterface files next to the stdlib swiftmodules, for testing purposes.
2018-08-28 14:56:02 -07:00
Jordan Rose
e224e31720 Break almost all dependencies of Driver on Frontend
- Sink OutputFileMap{.h,.cpp} and ReferenceDependencyKeys.h to Basic
- Remove unnecessary includes of Frontend.h.
2018-08-27 20:47:58 -07:00
Jordan Rose
845e8bef5f [Driver] Add -experimental-emit-interface for textual interfaces
This will eventually become plain old -emit-interface, but we don't
want people to be using it just yet. This is just for testing.
2018-08-24 18:02:48 -07:00
Jordan Rose
4d9b85b670 [Driver] Drop redundant arguments in various helper functions
The OutputInfo, ToolChain, and Triple can all be retrieved from the
Compilation, so now that we're passing one of those around we don't
need to pass the others explicitly.

No functionality change.
2018-08-24 18:02:48 -07:00
swift-ci
c648e2d214 Merge remote-tracking branch 'origin/master' into master-next 2018-07-31 08:50:06 -07:00
Graydon Hoare
ff88c7f369 Merge pull request #18362 from graydon/rdar-41271283-batch-mode-limit-memory-pressure-on-large-modules
[BatchMode] <rdar://41271283> Limit memory pressure on large modules.
2018-07-31 08:46:35 -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
Graydon Hoare
d5a9f44e4a [BatchMode] <rdar://41271283> Limit memory pressure on large modules. 2018-07-30 17:26:31 -07:00
swift-ci
f3dea5d0b0 Merge remote-tracking branch 'origin/master' into master-next 2018-07-30 11:29:05 -07:00
Keith Smiley
7f3804683b Add warning for bitcode marker without object (#18304)
Previously if you passed `-embed-bitcode-marker` to a command that
wasn't producing an object file, it would silently be ignored. This
change puts it inline with `-embed-bitcode` in this same case, which
generates a warning.
2018-07-30 11:24:09 -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
Jordan Rose
6e5aefc0b5 Rename file_types::getTypeTempSuffix to getExtension
Let's be honest: this isn't just for temporary files. Also, it's not
really a "suffix" if it doesn't include the leading dot.

No functionality change.
2018-07-25 21:49:01 -07:00
swift-ci
36ead37964 Merge remote-tracking branch 'origin/master' into master-next 2018-07-24 17:49:02 -07:00
Jordan Rose
de30596ccd Merge pull request #17665 from allevato/debug-prefix-map-wip
Implement -debug-prefix-map flag.
2018-07-24 17:34:42 -07:00
swift-ci
d7c334c1e7 Merge remote-tracking branch 'origin/master' into master-next 2018-07-24 12:49:50 -07:00
Jordan Rose
a39afdc778 Merge pull request #18090 from jrose-apple/emit-interface-path
[Frontend] Add a new -emit-interface-path option
2018-07-24 12:49:27 -07:00
Jordan Rose
b9ae66d768 [Frontend] Add a new -emit-interface-path option
...but don't hook it up to anything yet.

This is the very very start of the module stability / textual
interfaces feature described at

  https://forums.swift.org/t/plan-for-module-stability/14551/

For now I've just made it a frontend option (not a driver option),
which is good enough for testing.
2018-07-20 16:40:51 -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
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
Huon Wilson
9dab667544 [Driver] Make the TBD file behave more like a normal auxiliary output. 2018-07-20 08:12:22 +10: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
3406cebee3 Merge remote-tracking branch 'origin/master' into master-next 2018-07-03 16:09:00 -07:00
Huon Wilson
0113ed01ce Merge pull request #17415 from huonw/remove-emit-public-type-metadata-accessors-flag
[Driver] Completely remove -emit-public-type-metadata-accessors.
2018-07-04 09:04:23 +10:00
Tony Allevato
78edd30ddf Implement -debug-prefix-map flag.
This flag is based on Clang's -fdebug-prefix-map, which lets the user remap absolute paths in debug info. This is necessary for reproducible builds and allows debugging to work on a different machine than the one that built the code when paths to the source may be different.
2018-07-01 18:22:15 -07:00