swift-ci
e00f4fb59e
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-01 09:15:42 -07:00
Arnold Schwaighofer
4b0328f24f
IRGen: Also list specialized generic class' objective c ro data in the dedicated linker section
...
List the emitted ro_data of specialized generic classes in the
__objc_clsrolist section.
rdar://132354480
2024-07-31 12:52:50 -07:00
Ben Barham
5b4cd16647
[rebranch] Add missing llvm/IR/Module.h include
...
`llvm/IR/Module.h` was presumably being transitively included
previously.
2024-07-31 08:54:35 -07:00
swift-ci
ee5c37e742
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-28 22:14:29 -07:00
Alejandro Alonso
ca8c90ecc0
Support movesAsLike for the array variant of @_rawLayout
2024-07-28 10:29:57 -07:00
swift-ci
8139c0e645
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-26 19:34:36 -07:00
Dario Rexin
90a9ffdf02
[IRGen] Properly compute bit mask for extra tag bits in CVW
...
rdar://132501359
PowerOf2Ceil is not the correct function to use, because we end up with an empty mask if there is only one value stored in the extra tag bits
2024-07-26 14:50:54 -07:00
swift-ci
3419f76e4f
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-26 01:33:19 -07:00
Konrad `ktoso` Malawski
eb675c222e
[Distributed] Correct tbd handling for distributed thunks ( #74935 )
2024-07-26 16:52:18 +09:00
swift-ci
f1ea924a51
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-24 10:14:18 -07:00
Allan Shortlidge
54301e4f0f
IRGen: Update AllocStackHoisting for macCatalyst.
...
Teach `inhibitsAllocStackHoisting` about the `targetVariantOSVersionAtLeast`
and `targetOSVersionOrVariantOSVersionAtLeast` builtins.
2024-07-23 17:00:10 -07:00
Allan Shortlidge
e4331af916
IRGen: Introduce macCatalyst target variant version check builtins.
2024-07-23 17:00:10 -07:00
Allan Shortlidge
bb8a837dcf
IRGen: Honor -target-variant flag for zippered macCatalyst binaries.
2024-07-23 17:00:10 -07:00
swift-ci
b08252db8d
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-19 20:15:47 -07:00
Dario Rexin
e0d9da454c
[IRGen] Properly extract values in visitThrowInst for empty error
...
rdar://132122011
For async functions we have to extract the values, which was not happening when the error type was empty.
2024-07-19 17:01:13 -07:00
swift-ci
9448b5ad08
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-19 06:14:52 -07:00
smonteiro2
684e9ebf0c
[cxx-interop] Implements CxxMutableSpan, created from an UnsafeMutableBufferPointer
...
* Added tests for generic functions
* Add some tests for mutable spans
* Initialize ConstSpan from UnsafeMutableBufferPointer
* Change hardening flag
2024-07-19 10:38:52 +01:00
swift-ci
ba544b4870
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-18 04:15:45 -07:00
Gábor Horváth
e836e2caeb
Merge pull request #75176 from swiftlang/gaborh/inheritance-2
...
[cxx-interop] Fix wrong field offsets with value types using inheritance
2024-07-18 03:59:47 -07:00
swift-ci
fcdf7014dc
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-17 19:10:50 -07:00
Dario Rexin
e3577ed266
Merge pull request #75316 from drexin/wip-131960281
...
[IRGen] Skip async context params before handling direct error return…
2024-07-17 19:00:46 -07:00
Dario Rexin
99db2dcc61
[IRGen] Skip async context params before handling direct error return values
...
rdar://131960281
We need to skip the async context params, otherwise we load the wrong parameters.
2024-07-17 15:47:29 -07:00
Gábor Horváth
1b4bba3cec
Update lib/IRGen/GenStruct.cpp
...
Co-authored-by: John McCall <rjmccall@apple.com >
2024-07-17 09:32:23 +01:00
Gábor Horváth
824fccac92
Update lib/IRGen/GenStruct.cpp
...
Co-authored-by: John McCall <rjmccall@apple.com >
2024-07-17 09:32:17 +01:00
swift-ci
11d0ff8d80
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-16 13:55:15 -07:00
Dario Rexin
c276904372
Merge pull request #75270 from drexin/wip-131798355
...
[IRGen] Fix emitPrimitiveLoadPayloadAndExtraTag for CVW
2024-07-16 13:46:55 -07:00
Kavon Farvardin
fedd5e2977
Merge pull request #74864 from kavon/ncgenerics-runtime-demangling-fix
2024-07-16 13:38:15 -07:00
Dario Rexin
e3e06a79e4
[IRGen] Fix emitPrimitiveLoadPayloadAndExtraTag for CVW
...
rdar://129627898
When casting the projectedBits to Int8, we accidetnally passed the base addr instead of the projectedBits. This was causing the wrong bits to be read.
2024-07-16 10:35:01 -07:00
Kavon Farvardin
d755e90236
NCGenerics: limit field metadata heuristic
...
We have had a heuristic that lets you reflect fields of types, where
the field's type is conditionally Copyable, despite the reflection
infrastructure always copying a field. That heuristic was added to allow
ubiquitous types like Optional in the stdlib to continue to be
reflected, even if the Optional at runtime really isn't Copyable.
As a consequence, we were also allowing reflection of fields containing
user-defined conditionally copyable types, when that's unsafe for no
real benefit, yielding runtime crashes!
I think in that case it's better to fall-back on the non-crashy case of
reflection seeing it as the EmptyTupleType, which isn't inhabited, so it
won't try to copy the field and instead basically skip-over it until a
future runtime supports the reflection safely.
So, this patch limits the dangerous reflection to only stdlib-defined
types, until Mirror and friends are updated.
2024-07-15 22:10:17 -07:00
Kavon Farvardin
76bb266624
NCGenerics: fix runtime demangling strategy
...
We generally should use the open-coded, metadata function "accessor"
strategy when targeting older runtimes, but if the type is part of
the stdlib, assume the runtime demangler will produce correct
metadata, as the retrofitting of Optional, etc, was done Carefully.
resolves rdar://131337585
2024-07-15 22:10:17 -07:00
swift-ci
81a582e9f7
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-15 15:34:55 -07:00
Dario Rexin
14df7a1db9
Merge pull request #75246 from drexin/wip-131352085
...
Revert "[IRGen] Fetch the correct IGM for synthesized files"
2024-07-15 15:32:15 -07:00
Dario Rexin
a401d15ea5
Revert "[IRGen] Fetch the correct IGM for synthesized files"
...
rdar://131352085
This change caused the problems it was supposed to fix for Macros to appear with Differentiation.
This reverts commit d33f2c4ba1 .
2024-07-15 10:47:42 -07:00
swift-ci
49a48d8781
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-13 20:54:46 -07:00
Dario Rexin
9b1a82d9ec
[IRGen] Add direct error return support for async functions
...
rdar://129359370
Second part of direct error support. This implements direct errors for async functions. Instead of always returning typed errors indirectly, we are returning them directly when possible.
2024-07-13 17:02:32 -07:00
Gabor Horvath
ce3fa734ce
[cxx-interop] Fix wrong field offsets with value types using inheritance
...
Instead of adding opaque fields for the base subobjects this patch
introduces a recursive walk to add all the base fields to the generated
Swift struct.
rdar://126754931
2024-07-11 17:20:18 +01:00
swift-ci
0be42b6b18
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-11 06:14:58 -07:00
Slava Pestov
c345ba94c8
Merge pull request #75164 from slavapestov/irgen-collect-link-libraries
...
AST: Optimize collectLinkLibraries()
2024-07-11 09:00:14 -04:00
Mykola Pokhylets
816d62c972
Merge remote-tracking branch 'upstream/main' into mpokhylets/isolated-deinit
...
# Conflicts:
# include/swift/Basic/Features.def
# lib/SILGen/SILGenDestructor.cpp
# test/Concurrency/flow_isolation.swift
# test/abi/macOS/arm64/concurrency.swift
# test/abi/macOS/x86_64/concurrency.swift
2024-07-11 13:11:59 +02:00
Mykola Pokhylets
b189495518
Introduced isolated deinit as a SIL entity
2024-07-11 13:09:05 +02:00
swift-ci
a32c1896dc
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-10 23:09:47 -07:00
Andrew Trick
12acde2215
Merge pull request #75096 from meg-gupta/lifetimedeparg
...
Add support for lifetime dependence in parameter position
2024-07-10 22:56:23 -07:00
swift-ci
787d4b51d2
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-10 21:13:31 -07:00
Dario Rexin
8fca31efde
Merge pull request #75150 from drexin/wip-130971168
...
[IRGen] Don't apply direct error return to functions with indirect result
2024-07-10 21:07:40 -07:00
Ben Barham
2715d0e9d6
Merge branch 'main' into 20240710-main-to-rebranch
...
Conflicts:
- `test/Interop/Cxx/class/method/methods-this-and-indirect-return-irgen-itanium.swift`
previously fixed on rebranch, now fixed on main (slightly differently).
2024-07-10 20:42:09 -07:00
Dario Rexin
32af2f6c19
Merge pull request #75149 from drexin/wip-ptr-cast-tt
...
[IRGen] Apply int to ptr conversion for direct error returns if neces…
2024-07-10 20:37:49 -07:00
Slava Pestov
403bb98451
AST: Optimize collectLinkLibraries()
...
SourceFile::collectLinkLibraries() did not depend on the source file,
so let's move this logic up into ModuleDecl::collectLinkLibraries().
2024-07-10 23:06:22 -04:00
Slava Pestov
d1847ffde7
Merge pull request #75068 from slavapestov/simplify-sub-map
...
Simplify and optimize SubstitutionMap
2024-07-10 20:45:56 -04:00
Dario Rexin
e3c0bc880c
[IRGen] Don't apply direct error return to functions with indirect result
...
rdar://130971168
Having direct and indirect results on the same function is illegal.
2024-07-10 16:11:03 -07:00
Dario Rexin
11a55de697
[IRGen] Apply int to ptr conversion for direct error returns if necessary
...
rdar://131494255
When merging a ptr into an int value for direct error return, we have to properly convert it back to a pointer at the callsite
2024-07-10 16:09:39 -07:00