Commit Graph

13074 Commits

Author SHA1 Message Date
swift-ci
6354969e32 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-05 08:53:50 -07:00
Konrad 'ktoso' Malawski
30d54531a7 [Distributed] Don't drop dist get accessors from witness tables.
This actually manifested as an pointer auth crash, but the real reason
being is that we messed up the order of elements in the witness table.
If we'd skip the accessor like this, the types we sign/auth with would
no longer align and manifest in a crash.

There is no real reason to skip this entry so we just bring it back, and
avoid making this special in any way.

This unlocks a few tests as well as corrects any distributed+protocol
use where a requirement distributed var was _followed by_ other
requirements.

resolves rdar://125628060
2025-06-05 16:58:00 +09:00
Doug Gregor
bc4cf1236b [SIL] Generalize CastingIsolatedConformances to CheckedCastInstOptions
We are going to need to add more flags to the various checked cast
instructions. Generalize the CastingIsolatedConformances bit in all of
these SIL instructions to an "options" struct that's easier to extend.

Precursor to rdar://152335805.
2025-06-04 17:12:28 -07:00
swift-ci
7865bdc39e Merge remote-tracking branch 'origin/main' into rebranch 2025-06-04 05:15:40 -07:00
Konrad `ktoso` Malawski
84c2c38556 Merge pull request #81958 from ktoso/wip-distributed-irgenmangler-more 2025-06-04 21:02:52 +09:00
Konrad 'ktoso' Malawski
cc532fbbd9 [Distributed] More IRGenMangler fixes for distributed thunks
We also need to mangle the dispatch thunks to distributed thunks
uniquely.
2025-06-04 08:40:19 +09:00
swift-ci
c644714263 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-03 11:07:29 -07:00
eeckstein
50c6824263 Merge pull request #81935 from eeckstein/min-pointer-value-option
IRGen: add an option `-min-valid-pointer-value` to override the target's LeastValidPointerValue
2025-06-03 19:21:58 +02:00
swift-ci
d74df31b8f Merge remote-tracking branch 'origin/main' into rebranch 2025-06-03 08:53:48 -07:00
Saleem Abdulrasool
51645d00a3 Merge pull request #81754 from compnerd/closed
IRGen: honour `-static-libclosure` in block creation
2025-06-03 08:35:07 -07:00
swift-ci
b273df1e14 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-03 02:39:01 -07:00
Konrad `ktoso` Malawski
78c68ee069 Merge pull request #81805 from ktoso/wip-distributed-fixes 2025-06-03 18:22:22 +09:00
Erik Eckstein
c02bc2d421 IRGen: add an option -min-valid-pointer-value to override the target's LeastValidPointerValue
The LeastValidPointerValue is hard-coded in the runtime.
Therefore this option is only available in embedded swift - which doesn't have a runtime.

rdar://151755654
2025-06-03 09:27:35 +02:00
Michael Chiu
7bbafc599d Merge branch 'main' into mchiu/freebsd 2025-06-02 13:33:18 -04:00
swift-ci
f6526c0013 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-02 10:00:43 -07:00
Pavel Yaskevich
e1e9f04398 Merge pull request #81863 from xedin/using-for-default-isolation-in-file-context
[AST/Sema] SE-0478:  Implement `using` declaration under an experimental flag
2025-06-02 09:56:29 -07:00
Konrad 'ktoso' Malawski
fb6453c64c [Distributed] IRGen mangler must mangle distributed thunk 2025-06-02 13:34:09 +09:00
swift-ci
ae49f6807e Merge remote-tracking branch 'origin/main' into rebranch 2025-05-30 14:34:38 -07:00
Egor Zhdan
284c3716c2 Merge pull request #81844 from swiftlang/egorzhdan/zero-sized-no-unique-address
[cxx-interop] Do not crash when emitting layout of `std::string`
2025-05-30 22:14:37 +01:00
Egor Zhdan
a7c174431f [cxx-interop] Do not crash when emitting layout of std::string
If a `[[no_unique_address]]` field has zero size according to Clang, and field has a type that isn't representable in Swift, Swift would previously try to add an opaque field of size 1 for it.

This is wrong and was causing crashes for `std::string` while emitting a padding field:
```
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T1> _LIBCPP_CONCAT3(__padding1_, __LINE__, _);
```

rdar://151941799
2025-05-30 17:32:15 +01:00
swift-ci
9a8f73c32b Merge remote-tracking branch 'origin/main' into rebranch 2025-05-30 04:16:58 -07:00
Susana Monteiro
8ce5f2bf2d Merge pull request #81838 from swiftlang/susmonteiro/metadata-private-fields
[cxx-interop] Ensure field offset vector matches the structs/fields metadata
2025-05-30 12:03:32 +01:00
Pavel Yaskevich
aabfebec03 [AST] Add new declaration - using
Initially this declaration is going to be used to determine
per-file default actor isolation i.e. `using @MainActor` and
`using nonisolated` but it could be extended to support other
file-global settings in the future.
2025-05-30 00:39:06 -07:00
swift-ci
a90269ebb6 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-29 14:55:33 -07:00
susmonteiro
c3077bfedb [cxx-interop] Ensure field offset vector matches the structs/fields metadata 2025-05-29 18:35:30 +01:00
michael-yuji
8738e722bd Merge branch 'main' into mchiu/freebsd 2025-05-28 14:44:11 -07:00
Nate Chandler
94e7582d93 [IRGen] This ArtificialLoc requires a debug scope.
An `IRGenFunction` may not have a debug scope--for example, a dispatch
thunk--but creating an `AritificalLocation` requires one.  Only create
an `ArtificalLocation` here if the `IRGenFunction` has one.

Unfortunately, I don't have an isolated test case.  Fixes a compiler
crash.
2025-05-28 11:19:03 -07:00
Saleem Abdulrasool
c0993d466d IRGen: honour -static-libclosure in block creation
When creating a block, ensure that we correctly associate the DLL
Storage on the `_NSConcreteStackBlock` root object declaration based
upon whether we are generating code with `-static-libclosure` being
passed to the clang importer or not.
2025-05-24 08:23:42 -07:00
swift-ci
457aa96d07 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-23 14:54:46 -07:00
Shubham Sandeep Rastogi
f91f8c5283 Merge pull request #81563 from rastogishubham/CompDir
Set the Compilation directory when generating the Skeleton CU
2025-05-23 14:39:16 -07:00
swift-ci
104b7ebb11 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-23 12:14:46 -07:00
susmonteiro
7686f05f28 [cxx-interop] Ensure consistent checks for exportable fields 2025-05-23 15:21:34 +01:00
Shubham Sandeep Rastogi
b286b1c3a5 Set the Compilation directory when generating the Skeleton CU
When creating a skeleton Compile Unit, the DIFile passed
in, it always uses the include path. This leads to the DW_AT_comp_dir
being wrong, if the -file-compilation-dir option is passed, we need to
use the remapped compilation dir passed in to the DIFile instead.

This patch fixes that problem.
2025-05-22 08:37:10 -07:00
Augusto Noronha
680fbc566f Revert "Merge pull request #79171 from augusto2112/debug-info-witness-table"
This reverts commit c8eba86c3e, reversing
changes made to 98c3993503.
2025-05-22 11:45:37 +09:00
michael-yuji
9a948a9c3b Merge branch 'main' into mchiu/freebsd 2025-05-21 16:29:16 -07:00
swift-ci
4aa8e0ae28 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-21 11:29:32 -07:00
Susana Monteiro
e805d93d95 Merge pull request #81035 from swiftlang/susmonteiro/metadata-private-fields
[cxx-interop] Fix metadata mismatch regarding fields of structs
2025-05-21 19:25:08 +01:00
Anthony Latsis
12823706a8 Merge pull request #81667 from AnthonyLatsis/rebranch
[rebranch] DebugInfo: Restore old behavior in call to `llvm::DIBuilder::createOb…
2025-05-21 05:48:46 +01:00
Anthony Latsis
ff64fc79af DebugInfo: Restore old behavior in call to llvm::DIBuilder::createObjectPointerType
Fix my mistake in 66a6df9a44. `false` is
the wrong value for the new `Implicit` parameter because it causes the
`FlagArtificial` flag to not be set as before that change. The flag
itself looks appropriate because the entry is constructed for a built-in
type.
2025-05-21 05:44:06 +01:00
swift-ci
f56bccdc2c Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 21:37:55 -07:00
eeckstein
0ceb5171ff Merge pull request #81649 from eeckstein/global-inlinearray-initialization
Allow more complex InlineArray initializations to end up in a statically initialized global
2025-05-21 06:24:28 +02:00
swift-ci
4058e33d8f Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 21:17:39 -07:00
Slava Pestov
490edfa523 Merge pull request #81564 from slavapestov/fix-issue-78191
IRGen: Fix miscompile when a generic parameter is fixed to a tuple containing a pack
2025-05-21 00:06:59 -04:00
swift-ci
8108f779a5 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 17:48:45 -07:00
Augusto Noronha
c8eba86c3e Merge pull request #79171 from augusto2112/debug-info-witness-table
[DebugInfo] Emit debug info for witness tables
2025-05-21 09:23:04 +09:00
Erik Eckstein
9052652651 add the prepareInitialization builtin.
It is like `zeroInitializer`, but does not actually initialize the memory.
It only indicates to mandatory passes that the memory is going to be initialized.
2025-05-20 20:46:33 +02:00
swift-ci
8ec33f9344 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 10:39:13 -07:00
Stephen Canon
3aa7b592b6 Implement Builtin.select binding llvm select instruction (#81598)
Not used (yet), but needed to implement SIMD.replacing(with:where:) idiomatically, and probably useful otherwise.
2025-05-20 13:30:59 -04:00
susmonteiro
72b13b3b48 [cxx-interop] Fix metadata mismatch regarding fields of structs 2025-05-20 10:15:14 +01:00
swift-ci
fe523c4b0b Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 02:15:11 -07:00