Commit Graph

1004 Commits

Author SHA1 Message Date
Alexander Shaposhnikov
1525e9bfc5 [Windows] Add initial implementation for TaskQueue 2019-05-14 11:42:08 -07:00
Saleem Abdulrasool
218b37e1bb build: rename LLVM_COMPONENT_DEPENDS
This is not a target dependency but a target link.  Name the parameter
to be less misleading.  This also makes the name identical to the LLVM
parameter.
2019-05-04 19:58:28 -07:00
Slava Pestov
6d7d13fceb IRGen: Disable eager initialization of NSCoding adopters on newer targets
If a class does not have a custom @objc name, objc_getClass() can find
it at runtime by calling the Swift runtime's metadata demangler hook.

This avoids the static initializer on startup. If the class has a
custom runtime name we still need the static initializer unfortunately.

Fixes <rdar://problem/49660515>.
2019-05-01 17:43:58 -04:00
Slava Pestov
3b6ec6c651 IRGen: Move some deployment target checks to LangOptions 2019-05-01 15:13:12 -04:00
Sam Lazarus
3d9b6396a1 Merge pull request #24059 from sl/sl/sr-10293
Allow var / let as parameter names but provide a warning and fixit to add backticks.
2019-04-26 09:30:23 -04:00
Sam Lazarus
2a38b48eea Parse / AST: Allow let / var as argument labels with a warning.
The diagnostic is now a warning and the new message alerts the user that
though it is valid to have let and var as argument label names,
they are interpreted as argument labels, not keywords.
2019-04-26 04:08:01 -04:00
Jordan Rose
f4487881e4 Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what
version of Swift you were running. Usually that can be gleaned from
the path, but not always.
2019-04-24 15:53:56 -07:00
Alex Langford
d8d93fd622 [CMake] Fix UUID include dir logic 2019-04-15 14:40:15 -07:00
Michael Gottesman
91dbbc3088 Merge pull request #23204 from compnerd/silence-in-the-library
Remove custom handling in add_swift_host_library
2019-04-08 10:49:42 -07:00
Jason Mittertreiner
8998235ed6 Enable Child Memory Usage Tracking on Windows (#23686)
Windows requires a handle to get memory usage, so do a slight refactor
to collect the child's memory usage as it exits instead of as the parent
is cleaning up.
2019-03-30 18:54:30 -07:00
Michael Gottesman
384882d5f3 Merge pull request #23201 from compnerd/patience-is-not-always-a-virtue
build: introduce and switch to GYB_SOURCES
2019-03-20 13:27:32 -07:00
David Zarzycki
d2c5597707 [Tests] Stabilize output order maps against incidental changes
The output file map is created in DenseMap order, which is an unordered
and "unstable" collection type.
2019-03-18 07:22:23 -04:00
Saleem Abdulrasool
8ed5c1a4bc build: introduce and switch to GYB_SOURCES
This avoids us having to pattern match every source file which should
help speed up the CMake generation.  A secondary optimization is
possible with CMake 3.14 which has the ability to remove the last
extension component without having to resort to regular expressions.  It
also helps easily identify the GYB'ed sources.
2019-03-11 13:48:54 -07:00
Saleem Abdulrasool
b0005e9f87 build: remove C_COMPILE_FLAGS from add_swift_host_library
Use the appropriate CMake mechanism for controlling flags for building
the code.
2019-03-10 15:38:55 -07:00
Jason Mittertreiner
b895f0cf17 Have Windows Call Signaled Callback on Crashes (#23018)
The signaled callback is treated more as a general crash handler clean
up wise. While it doesn't 100% line up, have Windows call the signaled
callback on exit codes considered to be errors.
2019-03-01 17:49:26 -08:00
Brent Royal-Gordon
f1d1df3b30 Merge pull request #22842 from brentdax/target-practice
Name platform-specific module files using a normalized target triple
2019-02-28 16:07:37 -08:00
Jason Mittertreiner
2680c34a15 Implement SeparateErrors on Windows
To display stack traces from child processes, the driver combines stdout
and stderror together on Unix. This makes the Basic implementation also
do that.
2019-02-27 14:39:50 -08:00
Brent Royal-Gordon
64760981d0 [NFC] Restyle getTargetSpecificModuleTriple()
* Adds documentation comments.
* Turns redundant cases into comments.
* Removes the else branch in a couple “if (…) return …; else return …;” patterns.
2019-02-27 11:44:10 -08:00
Brent Royal-Gordon
c1cc51d1f3 Use target triple for “universal” modules
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
2019-02-27 11:43:12 -08:00
Argyrios Kyrtzidis
04992a58d1 [CMake] Provide a way to build the minimum things necessary for the syntax parser library
These changes allow to optionally perform a very fast build that is targeted to only produce the syntax parser library.
Part of addressing rdar://48153331
2019-02-23 11:31:31 -08:00
Argyrios Kyrtzidis
05893a8595 Merge pull request #22831 from compnerd/cmake-modernise-1
cmake: switch host libraries to use `target_link_libraries`
2019-02-23 10:57:07 -08:00
Saleem Abdulrasool
9934532e07 cmake: switch host libraries to use target_link_libraries
This is a follow up to the discussion on #22740 to switch the host
libraries to use the `target_link_libraries` rather than the
`LINK_LIBRARIES` special handling.  This allows the dependency to be
properly tracked by CMake and allows us to use the more modern syntax.
2019-02-22 15:28:07 -08:00
Jason Mittertreiner
ac0d9ef31a Fixed Driver Dependency Tests on Windows
All Driver/Dependency Tests now pass on Windows!
2019-02-21 11:19:57 -08:00
Bob Wilson
93b29dcc89 master-next: Add switch case for new Hurd triple in llvm r347832 2019-02-08 14:22:56 -08:00
Saleem Abdulrasool
adcdc39791 swift: update for LLVM SVN r344140
Update swift's usage of clang::vfs which has been hoisted into LLVM.
2019-02-07 17:53:42 -08:00
Bob Wilson
411fae3e5e [master-next] Add HermitCore OS type for LLVM triples
LLVM r340675 added a new HermitCore OS type to triples, which broke the
Swift build because it is using -Werror,-Wswitch and the new value was not
handled in swift::getPlatformNameForTriple
2019-02-07 16:52:45 -08:00
Slava Pestov
0882695f64 Mangler: Tighten up round-trip check 2019-01-29 02:15:56 -05:00
Saleem Abdulrasool
326d42378e Basic: convert UUIDs to uppercase
Darwin does not follow the ITEF specification (RFC 4122) and emits the UUID in
uppercase and expects the emission to be uppercase.  Convert to upper case when
translating the UUID from the binary representation to the string
representation.  This repairs the SIL parsing tests on Windows.
2018-12-21 10:43:20 -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
Ted Kremenek
6c8bed847f Merge pull request #20374 from tkremenek/swift5-verison
Bump compiler version to Swift 5.
2018-11-16 04:30:08 -08:00
Michael Ilseman
c5ce63a5cc Merge pull request #20599 from milseman/emoji_tag
[Character] Permit tagged emoji Character literals
2018-11-15 13:21:35 -08:00
Saleem Abdulrasool
9cc9a94d56 Merge pull request #20469 from tinysun212/pr-os-macro-cygwin-2
[LangOptions] os(Cygwin) is not true on Cygwin
2018-11-15 12:13:34 -08:00
Michael Ilseman
bca1b74427 [Character] Permit tagged emoji Character literals
Loosen up the compiler's grapheme analysis to allow the emoji tagged
sequences as graphemes.
2018-11-15 09:06:20 -08:00
Joe Groff
2f4a90178c Merge pull request #20582 from jckarter/multi-payload-xi-empty
Fix ClusteredBitVector::fromAPInt for zero-sized vectors.
2018-11-14 17:41:13 -08:00
Ted Kremenek
cf2dce9166 Merge branch 'master' of https://github.com/apple/swift into swift5-verison
# Conflicts:
#	test/api-digester/Outputs/stability-stdlib-source.swift.expected
2018-11-14 17:31:55 -08:00
Joe Groff
4428d479aa Fix ClusteredBitVector::fromAPInt for zero-sized vectors.
A one-bit zero APInt is a reasonable stand-in for everywhere we need this.
2018-11-14 14:05:21 -08:00
Vinicius Vendramini
f6c7815799 Add a few fixes mentioned in the code review. 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
Han Sang-jin
859f144b75 [LangOptions] os(Cygwin) is not true on Cygwin
`Target.isOSWindows()` and `Target.isWindowsCygwinEnvironment()` are both true in Cygwin.
We should check the `os(Cygwin)` before `os(Windows)`.
2018-11-10 11:23:00 +09:00
Ted Kremenek
748dae7d10 Merge remote-tracking branch 'upstream/master' into swift5-version
# Conflicts:
#	validation-test/stdlib/HashedCollectionFilter3.swift
#	validation-test/stdlib/HashingPrototype.swift
2018-11-09 09:39:22 -08:00
Ted Kremenek
46510a5eba Bump compiler version to Swift 5.
Main pieces:

- Bump swift-version to 5
- Remove -swift-version 3 support
2018-11-06 14:38:55 -08:00
Michael Gottesman
a761d7c0ba Revert "Revert "Revert "[Build System: CMake] make add_swift_library a wrapper to add_llvm_library"""
This reverts commit 121f5b64be.

Sorry to revert this again. This commit makes some pretty big changes. After
messing with the merge-conflict created by this internally, I did not feel
comfortable landing this now. I talked with Saleem and he agreed with me that
this was the right thing to do.
2018-11-06 13:24:00 -08:00
Graydon Hoare
e272ece309 Merge pull request #20170 from graydon/text-interface-to-module
Switch from .sid files to using FILE_DEPENDENCY records in INPUT_BLOCK
2018-11-06 07:52:09 -08:00
Saleem Abdulrasool
121f5b64be Revert "Revert "[Build System: CMake] make add_swift_library a wrapper to add_llvm_library""
This reverts commit 103f9a8246.
2018-11-05 14:37:40 -08:00
Xi Ge
103f9a8246 Revert "[Build System: CMake] make add_swift_library a wrapper to add_llvm_library" 2018-11-02 12:49:07 -07:00
Graydon Hoare
4938b002b4 [ModuleInterface] Remove SwiftParseableInterfaceDeps files, use INPUT_BLOCK. 2018-11-01 10:51:16 -07:00
Saleem Abdulrasool
c3555cf0c4 add_swift_host_library: special handling for GYB sources 2018-10-31 12:46:31 -07:00
Saleem Abdulrasool
c5c64ca3ea add_swift_host_library: rename LLVM_COMPONENT_DEPENDS to LINK_COMPONENTS 2018-10-31 12:46:31 -07:00
Saleem Abdulrasool
39dde93c88 add_swift_host_library: rename LINK_LIBRARIES to LINK_LIBS 2018-10-31 12:46:31 -07:00
Saleem Abdulrasool
e0b839330d add_swift_host_library: remove C_COMPILE_FLAGS 2018-10-31 12:46:31 -07:00