Commit Graph

4080 Commits

Author SHA1 Message Date
swift_jenkins
188047f500 Merge remote-tracking branch 'origin/main' into next 2022-03-17 14:20:55 -07:00
Alex Lorenz
cd93d23bac Merge pull request #41831 from hyp/unify-header
[cxx-interop] start emitting a unified header file for a Swift module
2022-03-17 14:04:57 -07:00
Alex Lorenz
9d52099d5b [cxx-interop] start to emitting a unified header file for a Swift module
This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now, but in the future, -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once  attribute is supported.
2022-03-17 10:34:47 -07:00
swift_jenkins
50ffd2f134 Merge remote-tracking branch 'origin/main' into next 2022-03-16 22:20:15 -07:00
Artem Chikin
57518b5894 Do not escape UNICODE when writing out target info.
Escaping unicode characters results in invalid JSON.

- Refactor writeEscaped routine into StringExtras

Resolves rdar://90108531
2022-03-16 15:30:21 -07:00
Robert Widmann
363954a416 Put Variadic Generics Behind a Flag 2022-03-16 14:22:03 -07:00
swift_jenkins
5ea632dcc8 Merge remote-tracking branch 'origin/main' into next 2022-03-15 21:40:37 -07:00
Alex Lorenz
683224acd4 Revert "Separate the C++ and Objective-C generated header output types."
This reverts commit c7a5049a28.
2022-03-15 17:00:51 -07:00
Evan Wilde
c34f7055f8 Detach enable-experimental-async-top-level flag
SE-0343 is approved so it's time to pull the feature out from behind the
experimental feature flag. This patch pulls it out and deprecates
passing the flag to the frontend so that we can pull it out entirely
eventually.
2022-03-15 16:07:03 -07:00
swift_jenkins
e1157303a0 Merge remote-tracking branch 'origin/main' into next 2022-03-15 13:40:57 -07:00
Pavel Yaskevich
5331e276d5 Merge pull request #41730 from xedin/se-0326-solve-pattern-bindings-via-conjunctions
[SE-0326] Re-enable multi-statement closure inference by default
2022-03-15 13:21:03 -07:00
swift_jenkins
946c2bf559 Merge remote-tracking branch 'origin/main' into next 2022-03-15 13:20:40 -07:00
Allan Shortlidge
b563dc0736 Frontend: Replace the abi magic value accepted by -target-min-inlining-version with a min magic value instead. The new value corresponds to the OS versions in which Swift was introduced. The introduction OS is a better floor for availability checking than the OS in which Swift became ABI stable because inlinable functions may reference clang declarations which have availability between Swift's introduction and ABI stability and framework developers ought to get diagnostics for unguarded use of those APIs in inlinable code. 2022-03-14 19:26:36 -07:00
swift_jenkins
75514b5691 Merge remote-tracking branch 'origin/main' into next 2022-03-11 16:59:54 -08:00
Konrad `ktoso` Malawski
13cc8b3157 [Distributed] Enable no-longer-experimental distributed by default 2022-03-11 22:14:49 +09:00
Andrew Trick
8a7e955b0d Move -enable-sil-opaque-value to SILOptions. 2022-03-09 17:18:15 -08:00
swift_jenkins
f6f290c8b5 Merge remote-tracking branch 'origin/main' into next 2022-03-09 08:41:04 -08:00
Pavel Yaskevich
5e4c964c36 [TypeChecker] SE-0326: Enable multi-statement closure inference by default 2022-03-08 21:37:40 -08:00
Slava Pestov
95f122f105 RequirementMachine: Add -enable-requirement-machine-loop-normalization flag 2022-03-08 22:47:22 -05:00
swift_jenkins
8fa3ac7286 Merge remote-tracking branch 'origin/main' into next 2022-03-07 17:41:10 -08:00
Allan Shortlidge
e25b822f7a Merge pull request #41673 from tshortli/inlining-availability-checking
Add -target-min-inlining-version to aid type checking for inlinable functions in resilient libraries
2022-03-07 17:30:59 -08:00
swift_jenkins
6fc0f9f481 Merge remote-tracking branch 'origin/main' into next 2022-03-04 19:01:05 -08:00
Evan Wilde
822097353b Check unavailable from async in interface file
We need to check the feature availability of _unavailableFromAsync
before it gets picked up in the swift interface file. This updates the
compiler to provide the necessary wrappings for that check.
2022-03-04 15:16:03 -08:00
Becca Royal-Gordon
bbcd980aff Add flag for minimum inlining version 2022-03-04 10:54:52 -08:00
swift_jenkins
68837151a9 Merge remote-tracking branch 'origin/main' into next 2022-03-03 19:00:58 -08:00
Slava Pestov
20ccd05120 AST: Support new primary associated type syntax in the ASTPrinter 2022-03-03 10:15:12 -05:00
swift_jenkins
3dd997af43 Merge remote-tracking branch 'origin/main' into next 2022-03-02 09:42:00 -08:00
Ben Langmuir
779bdf0bf3 Merge pull request #41550 from benlangmuir/make-next-less-sad
Pre-fix some build failures that we'll see with newer llvm
2022-03-02 09:23:07 -08:00
swift_jenkins
17eb5fe4cd Merge remote-tracking branch 'origin/main' into next 2022-02-27 08:41:21 -08:00
Slava Pestov
b3bc29527a Merge pull request #41578 from slavapestov/rqm-check-mode
RequirementMachine: Add fourth 'check' option to 'on'/'off'/'verify' flags
2022-02-27 11:26:26 -05:00
Slava Pestov
e8d240699e RequirementMachine: Add fourth 'check' option to 'on'/'off'/'verify' flags
This compares the results like 'verify' and prints output if there is
a mismatch, but does not assert.
2022-02-26 23:04:29 -05:00
swift_jenkins
6dd34df64e Merge remote-tracking branch 'origin/main' into next 2022-02-25 14:00:23 -08:00
Rintaro Ishizaki
c9e3699d1b Merge pull request #41500 from rintaro/swiftcompiler-ast
[SwiftCompiler] Add DiagnosticEngine bridging
2022-02-25 13:57:11 -08:00
swift_jenkins
4b42079098 Merge remote-tracking branch 'origin/main' into next 2022-02-25 11:40:16 -08:00
Slava Pestov
8e09ba8b45 RequirementMachine: Introduce 'concrete contraction' pre-processing pass before building rewrite system
See the comment at the top of ConcreteContraction.cpp for a detailed explanation.

This can be turned off with the -disable-requirement-machine-concrete-contraction
pass, mostly meant for testing. A few tests now run with this pass both enabled
and disabled, to exercise code paths which are otherwise trivially avoided by
concrete contraction.

Fixes rdar://problem/88135912.
2022-02-25 11:48:38 -05:00
Ben Langmuir
35478637d3 Migrate from SmallVector.set_size to resize_for_overwrite
In the "next" branch, set_size has been made protected. Instead, users
can use resize_for_overwrite, optionally followed by truncate, to
handle the same use cases more safely.
2022-02-24 13:54:22 -08:00
Ben Langmuir
5a5dd13ca1 Include what you use: Optional and Hashing
Add a few includes of Optional.h and Hashing.h. These files are failing
ot build in the "next" branch due to changes in llvm's own includes, but
it's general goodness to include them on main as well.
2022-02-24 13:47:04 -08:00
swift_jenkins
dbe0519987 Merge remote-tracking branch 'origin/main' into next 2022-02-24 09:00:39 -08:00
Rintaro Ishizaki
4d9b65d961 [SwiftCompiler] Add DiagnosticEngine bridging
* 'SourceLoc' and 'CharSourceRange' bridging in Basic
* New 'AST' bridging. 'DiagID', 'DiagnosticArgument', 'DiagnosticFixIt',
  and 'DiagnosticEngine'
2022-02-23 15:57:33 -08:00
Pavel Yaskevich
cd61b35e37 [Frontend] Add a flag for experimental type inference from default expressions 2022-02-21 09:59:05 -08:00
swift_jenkins
af6d2a3179 Merge remote-tracking branch 'origin/main' into next 2022-02-21 07:00:58 -08:00
Rintaro Ishizaki
da6814d510 [SwiftCompiler] Make BridgedArrayRef.data nullable
ArrayRef.data() can be nullptr when the array is empty.
2022-02-20 22:30:18 -08:00
Rintaro Ishizaki
7486cd1c21 [SwiftCompiler] Move common bridging facilities to 'Basic'
A preparation for AST/DiagnosticEngine bridging
2022-02-20 22:06:39 -08:00
swift_jenkins
d9a2f9ede4 Merge remote-tracking branch 'origin/main' into next 2022-02-20 05:00:30 -08:00
Anthony Latsis
b0043966cd Merge pull request #40269 from AnthonyLatsis/assoc-inference-system
AssociatedTypeInference: Initial refactoring of abstract type witness inference
2022-02-20 15:51:58 +03:00
swift_jenkins
ce5aaaffd2 Merge remote-tracking branch 'origin/main' into next 2022-02-18 19:00:56 -08:00
Rintaro Ishizaki
3fe6782bfb Merge pull request #41400 from rintaro/completion-fitername-precompute
[CodeCompletion] Precompute "filter name"
2022-02-18 18:57:47 -08:00
swift_jenkins
d5f483ef4f Merge remote-tracking branch 'origin/main' into next 2022-02-18 18:20:43 -08:00
Rintaro Ishizaki
3c33debd61 [CodeCompletion] Make all result's string fields null terminated
This is convenient for clients to pass these fields values to C
functions. Introduce NullTerminatedStringRef to guarantee that.
2022-02-18 11:34:45 -08:00
Rintaro Ishizaki
7ef93b2a67 [Basic] Move copyCString to Basic/StringExtras.
Also, use StringRef.copy() instead of copyString().
2022-02-18 11:34:45 -08:00