Commit Graph

4241 Commits

Author SHA1 Message Date
swift-ci
ce0f17aeac Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 21:35:40 -07:00
Henrik G. Olsson
7fcc72f108 Merge pull request #81859 from swiftlang/swiftify-inherit-imports
[MacrosOnImports][Swiftify] Copy module imports from clang node's module to its Swift macro SourceFile
2025-09-19 21:21:09 -07:00
swift-ci
0292981879 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 16:35:25 -07:00
Alexis Laferrière
97002e1ee0 Merge pull request #84373 from xymus/le-import-warn
Sema: Limit errors on LE importing non-LE modules to SDK modules
2025-09-19 16:34:48 -07:00
swift-ci
647f66ad2b Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 14:18:04 -07:00
Slava Pestov
21e34e3189 Merge pull request #84400 from slavapestov/prepared-overloads-flag
Sema: Add -solver-{enable,disable}-prepared-overloads frontend flags
2025-09-19 17:13:23 -04:00
swift-ci
3a31109821 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-19 10:35:08 -07:00
Anthony Latsis
b7b4b57799 Merge pull request #84391 from swiftlang/jepa-main5
tools: Set Swift bug report message in some executable targets
2025-09-19 18:15:20 +01:00
Anthony Latsis
ea5d89d0d0 tools: Set Swift bug report message in some executable targets
If these programs crash, we want them to print the Swift bug report
message, not the default LLVM one, which leads to
https://github.com/llvm/llvm-project/issues.

While here, hoist the setting of the bug report message to the
START_PROGRAM macro so that we don't forget to set it in the future.
2025-09-19 12:05:31 +01:00
swift-ci
ca93b4b068 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-18 16:17:26 -07:00
Slava Pestov
2deb5ff0a5 Sema: Add -solver-{enable,disable}-prepared-overloads frontend flags 2025-09-18 15:05:43 -04:00
Alexis Laferrière
3a7cf4747c Sema: Reorder the cases of LibraryLevel from less to more public 2025-09-18 09:39:35 -07:00
Kavon Farvardin
61fe8a9b8e introduce @_manualOwnership performance attribute
This attribute forces programmers to acknowledge every
copy that is required to happen in the body of the
function. Only those copies that make sense according
to Swift's ownership rules should be "required".

The way this is implemented as of now is to flag each
non-explicit copy in a function, coming from SILGen, as
an error through PerformanceDiagnostics.
2025-09-17 13:51:57 -07:00
Henrik G. Olsson
928cc6c83e [ClangImporter] Deduplicate imports copied from submodule to TLM
The imported top-level module inherits the imports of all its
(transitive) submodules. Since multiple submodules can import the same
modules these need to be deduplicated to avoid redundant work.
2025-09-16 21:10:03 -07:00
Henrik G. Olsson
17c0e564e8 Add hidden --dump-source-file-imports flag
This flag dumps all imports for each SourceFile after it's gone through
import resolution. It is only intended for testing purposes.
There are other ways to print imports, but they don't correspond 1:1 to
the imports actually resolved, which is a bit problematic when testing
implicit clang module imports.
2025-09-16 21:09:59 -07:00
swift-ci
0d2c4ca9be Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 10:29:21 -07:00
Meghana Gupta
c764244df0 Merge pull request #84180 from meg-gupta/borrowandmutatepr
Add preliminary support for borrow accessors
2025-09-15 10:01:15 -07:00
swift-ci
bf9d79f5c1 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-13 06:17:00 -07:00
Hamish Knight
6ef8f45659 NFC: Move AccessNotesPath to LangOptions 2025-09-11 16:54:08 +01:00
Meghana Gupta
459a95888c Add a new experimental feature for borrow and mutate accessors 2025-09-09 13:52:27 -07:00
swift-ci
07b17d605e Merge remote-tracking branch 'origin/main' into rebranch 2025-09-04 06:17:38 -07:00
Doug Gregor
ed93b46fa6 [Embedded] Introduce DeferredCodeGen feature.
Introduce an experimental feature DeferredCodeGen, that defers the
generation of LLVM IR (and therefore object code) for all entities
within an Embedded Swift module unless they have explicitly requested
to not be emitted into the client (e.g., with
`@_neverEmitIntoClient`).

This feature is meant to generalize and subsume
-emit-empty-object-file, relying on lazy emission of entities rather
than abruptly ending the compilation pipeline before emitting any IR.

Part of rdar://158363967.
2025-09-03 15:55:47 -07:00
swift-ci
94f8b0d0e3 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-25 17:03:36 -07:00
Michael Gottesman
bfecaa357f [frontend] Expose via a LangOption whether or not the compiler is compiling for a triple that supports AArch64 TBI.
Just breaking down layers of a larger patch to make it easier to review.
2025-08-21 12:52:49 -07:00
swift-ci
61a93fff56 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-20 22:03:38 -07:00
Slava Pestov
450f43f3f1 Merge pull request #83834 from slavapestov/subst-limit
AST: Allow substitution limits >= 32767
2025-08-20 22:17:57 -04:00
Slava Pestov
d80ad918d9 AST: Tweak substitution limits again
Fixes rdar://158608098.
2025-08-20 16:42:03 -04:00
swift-ci
0886d7a09d Merge remote-tracking branch 'origin/main' into rebranch 2025-08-20 09:18:03 -07:00
Pavel Yaskevich
a7ecd309d4 [AST] SE-0487: Promote NonexhaustiveAttribute to a language feature
The proposal [has been accepted](https://forums.swift.org/t/accepted-se-0487-nonexhaustive-enums/81508)
which makes the feature experimental no longer.
2025-08-20 00:39:51 -07:00
swift-ci
dda2ca64f3 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-19 19:17:51 -07:00
Meghana Gupta
9f435ad5bd Promote LifetimeDependenceMutableAccessors and InoutLifetimeDependence to language features
These were added to guard specific source code in swift interface files for older compilers.
They do not guard any experimental language feature specifically.
Turn them on by default to prevent unnecessary flags developers need to add in their configs.
2025-08-19 11:50:49 -07:00
swift-ci
ab9176fa4b Merge remote-tracking branch 'origin/main' into rebranch 2025-08-16 02:24:41 -07:00
Gabor Horvath
2a9f6f89e3 Revert "Merge pull request #83483 from Xazax-hun/turn-off-addressable"
Afteri #83712 landed, let's make another try enabling addressable
parameters by default.

This reverts commit 61d60eb6ad, reversing
changes made to 670f69eadc.
2025-08-15 15:28:20 +01:00
swift-ci
fdc5b2bc73 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-14 19:55:30 -07:00
Mykola (Nickolas) Pokhylets
31470bbd1e Merge pull request #82732 from nickolas-pohilets/mpokhylets/weak-let-feature
Wrap SE-0481 into an upcoming feature until source incompatibilities are resolved
2025-08-14 23:59:28 +02:00
swift-ci
23eb9d68bb Merge remote-tracking branch 'origin/main' into rebranch 2025-08-11 09:35:30 -07:00
Evan Wilde
3fcca83d07 Refactor getMinPlatformVersion
The definitions of how version numbers were extracted from target
triples split between the minimum platform version and for determining
the minimum inlining version.

This resulted in inlinable and transparent functions not being imported
correctly on non-Apple platforms where the version number is retained as
part of the target triple.
Specifically, `_checkExpectedExecutor` was found in the module, but
didn't have the appropriate availability version assigned, resulting in
it failing to import and the compiler silently omitting the check in
SILGen when compiling for FreeBSD.

This patch refactors the implementation of `getMinPlatformVersion` into
a separate function that is used in both places so that they cannot get
out of sync again.

Note: This changes how Windows is handled. getMinPlatformVersion
returned an empty version number for Windows, while the availability
implementation returned the OS version number. This makes both
consistently return the OS version number.
2025-08-08 15:10:04 -07:00
swift-ci
80c967ef0c Merge remote-tracking branch 'origin/main' into rebranch 2025-08-05 14:37:21 -07:00
Hamish Knight
728368734c Merge pull request #82987 from hamishknight/enable-inlinearray-sugar
Enable InlineArray type sugar
2025-08-05 22:20:39 +01:00
Anthony Latsis
eaafb0ed7e Manually merge remote-tracking branch 'origin/main' into rebranch
Conflicts:
- lib/ClangImporter/ClangImporter.cpp
2025-08-05 14:24:07 +01:00
Adrian Prantl
e690f1d6c4 Merge pull request #83415 from adrian-prantl/157063577
[ClangImporter] Allow LLDB to prefer serialized bridging headers.
2025-08-04 11:09:39 -07:00
Hamish Knight
396a6a8fe6 Enable InlineArray type sugar
Promote it from an experimental feature.

rdar://155607927
2025-08-04 15:16:30 +01:00
swift-ci
16c890488d Merge remote-tracking branch 'origin/main' into rebranch 2025-08-02 14:54:54 -07:00
John McCall
8a77cba10b Merge pull request #83501 from rjmccall/pack-tuple-projection-silgen
Fix projecting a tuple element out of a tuple with packs.
2025-08-02 14:32:27 -04:00
Mykola Pokhylets
89f8f8b9bf Wrap only changes related to the closure frontend logic 2025-08-02 20:24:46 +02:00
Mykola Pokhylets
ae48446716 Wrap SE-0481 into an upcoming feature until source incompatibilities are resolved 2025-08-02 20:24:21 +02:00
swift-ci
b1f090e3e8 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-02 08:55:07 -07:00
Hamish Knight
4f6e318940 Merge pull request #83477 from hamishknight/rec-room 2025-08-02 09:43:34 +01:00
swift-ci
4838c6e954 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-01 23:15:28 -07:00
John McCall
89d53258d7 Add PossiblyUniquePtr, a smart pointer that can dynamically store a
borrowed pointer.
2025-08-02 02:13:24 -04:00