Meghana Gupta
fecd2b452d
Don't mangle lifetime dependencies in older runtimes
2024-07-10 14:48:34 -07:00
Slava Pestov
977b444eb3
AST: Add a new overload of getContextSubstitutionMap()
2024-07-10 13:28:26 -04:00
Slava Pestov
45490894c4
IRGen: Reduce type witnesses in hasDependentTypeWitness()
2024-07-10 13:28:22 -04:00
Dario Rexin
22b6319c71
Merge pull request #75072 from drexin/wip-refactor-te-callemission
...
[IRGen] Move some typed error code in CallEmission into separate func…
2024-07-08 17:48:16 -07:00
Dario Rexin
25929b3b4d
[IRGen] Move some typed error code in CallEmission into separate function
...
This is in preparation of adding support for async calls, so the code can be shared between sync and async calls.
2024-07-08 12:28:02 -07:00
swift-ci
b7921a8232
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-06 14:34:09 -07:00
Slava Pestov
ca9c09f8a1
Remove some unused variables
2024-07-06 12:05:47 -04:00
Slava Pestov
86d567f95a
AST: ModuleDecl::lookupConformance() is a static method
2024-07-06 12:05:47 -04:00
Slava Pestov
3fcda140bb
AST: ModuleDecl::checkConformance() is a static method
2024-07-06 12:05:46 -04:00
Slava Pestov
1901862afc
AST: Remove LookUpConformanceInSignature
2024-07-06 12:05:46 -04:00
Slava Pestov
fae01d9776
AST: Remove ModuleDecl parameter from more places
2024-07-06 12:05:46 -04:00
swift-ci
9b22f7a183
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-05 00:13:41 -07:00
Erik Eckstein
6ed2489aee
IRGen: don't stack promote classes for which the layout has not a fixed size
...
In most cases this was already checked with `ClassLayout::isFixedLayout`. But for classes which are imported from another module and contain implementation-only C-imported stored properties, those properties don't show up in the class layout. Stack promoting such classes will reserve too less space on the stack which leads to all kind of memory corruption problems. The fix is to also check `ClassLayout::isFixedSize`, which returns false for such classes.
Fixes a miscompile
rdar://131067105
2024-07-04 17:03:31 +02:00
swift-ci
9148779681
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-04 00:15:21 -07:00
Doug Gregor
e50beb0a46
Merge pull request #74962 from DougGregor/typed-throws-backdeploy-fixes
...
Typed throws backdeploy fixes
2024-07-04 00:12:52 -07:00
Doug Gregor
9604019c87
Drop typed throws from the mangling in closure and field reflection metadata
...
This follows what we just did for `@isolated(any)` function types.
Part of rdar://130858222.
2024-07-03 20:14:01 -07:00
swift-ci
f0044fcfca
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-03 17:18:35 -07:00
Dario Rexin
5dcd163c42
[IRGen] Always load extra tag bits as full bytes in CVW to avoid elemination of masking
...
rdar://129627898
LLVM expects integer types of fractional byte sizes to have been written as those types as well, so it expects all unused bytes to be 0.
Since we are using the unused extra tag bits to store tags of outer enums, that assumption does not hold here. In regular witnesses,
the outer enum would mask out those bytes before checking the tag of the inner enum. In CVW we can't do that, so we have to apply the
mask ourselves. To guarantee the mask does not get optimized out, we have to use full bytes instead of fractionals.
2024-07-03 12:32:07 -07:00
swift-ci
f8b18eb54c
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-02 23:54:09 -07:00
John McCall
2c6e0efb9c
Suppress @isolated(any) in reflective metadata strings on old targets
...
Fix another aspect of rdar://129861211
2024-07-02 18:12:20 -04:00
Ben Barham
8e9ac93bd3
[IRGen] Use ConstantInt for otherDiscriminator
2024-07-01 14:52:51 -07:00
Ben Barham
4ee4c0fbac
[IRGen] Use new ASSERT macro over requires
...
`requires` was removed and replaced with `ASSERT`.
2024-07-01 14:52:51 -07:00
Ben Barham
a6cf31036a
Add AMDGPU builtin handling
2024-07-01 14:52:51 -07:00
swift-ci
1c7daa9a91
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-01 14:38:34 -07:00
Egor Zhdan
75a00adcf0
Merge pull request #74625 from swiftlang/egorzhdan/upstream-ptrauth-vwt
...
[IRGen] Upstream pointer auth for value witness tables
2024-07-01 22:17:59 +01:00
swift-ci
287d711d03
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-01 11:14:00 -07:00
Egor Zhdan
b22057e637
[IRGen] Upstream pointer auth for value witness tables
...
This makes Swift emit a signed pointer to the value witness table in type metadata.
The original change was done by Varun Gandhi.
2024-07-01 16:38:06 +01:00
susmonteiro
e86099c26d
[cxx-interop] Implements constructor for std::span from UnsafeBufferPointer
...
Tests: init span from UnsafeBufferPointer, for loop, map, filter, init Array from span, span of strings
2024-07-01 16:07:28 +01:00
swift-ci
147a2a7947
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-29 07:34:58 -07:00
Dario Rexin
b7c241df8e
Merge pull request #74717 from drexin/wip-128870792
...
[IRGen] Fetch the correct IGM for synthesized files
2024-06-29 07:33:17 -07:00
swift-ci
9a10a6c56a
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-28 23:34:18 -07:00
Dario Rexin
22fec31574
[IRGen] Properly convert between ptr and int in typed error mapping
...
rdar://130781414
2024-06-28 16:29:10 -07:00
Dario Rexin
b38a1b7ce7
[IRGen] Always apply error value mapping properly for direct returning typed throws
...
rdar://130783369
The missing mapping causes the wrong element to be used when the offsets are different.
2024-06-28 16:18:22 -07:00
swift-ci
f2e68e5db1
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-28 11:36:11 -07:00
Ben Barham
d8f381e660
Merge pull request #74804 from bnbarham/rename-equals
...
Update `StringRef::equals` references to `operator==`
2024-06-28 11:22:20 -07:00
Dario Rexin
d33f2c4ba1
[IRGen] Fetch the correct IGM for synthesized files
...
rdar://128870792
Synthesized files are treated as not having a parent source file, but that can cause issues for macro code. The declarations will have the source file of their use site declared as parent source file, which means they should be emitted into the same IGM. If we don't use the correct IGM, we can get inconsistencies when referencing the generated code, which will cause linking issues.
2024-06-28 11:07:38 -07:00
Ben Barham
d72f5b12c4
Update StringRef::equals references to operator==
...
`equals` has been deprecated upstream, use `operator==` instead.
2024-06-27 19:14:06 -07:00
Ben Barham
b7954411ec
Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
...
Conflicts:
- `include/swift/AST/PluginRegistry.h`
2024-06-27 14:56:11 -07:00
Akira Hatanaka
42bc49d3fe
Add a new parameter convention @in_cxx for non-trivial C++ classes that are passed indirectly and destructed by the caller ( #73019 )
...
This corresponds to the parameter-passing convention of the Itanium C++
ABI, in which the argument is passed indirectly and possibly modified,
but not destroyed, by the callee.
@in_cxx is handled the same way as @in in callers and @in_guaranteed in
callees. OwnershipModelEliminator emits the call to destroy_addr that is
needed to destroy the argument in the caller.
rdar://122707697
2024-06-27 09:44:04 -07:00
Alex Lorenz
af36238004
Merge pull request #74640 from hyp/eng/virtual-destructor-vtable-ref-irgen-linux-android
...
[cxx-interop] ensure that the body of implicit virtual destructor is …
2024-06-26 10:32:51 -07:00
Alex Lorenz
9c4232c89d
Merge pull request #74722 from hyp/eng/destructor-cxx-interop-exc-cleanup
...
[cxx-interop] ensure destructors referenced only by the exception cle…
2024-06-26 10:32:27 -07:00
Alex Lorenz
781a9fc1aa
[cxx-interop] ensure destructors referenced only by the exception cleanup landing pad in the constructor's initializer are picked up to be candidates for potential emission into one LLVM IR module
...
A C++ record destructor that is called implicitly in the landing pad cleanup code of a constructor after a field is initialized might only be referenced there, so the Clang decl finder should pick it up when scanning the AST for interesting Decls that might have to be emitted into one LLVM IR module.
2024-06-25 22:13:19 -07:00
Alex Lorenz
f4949bd8dc
fix
2024-06-25 18:22:40 -07:00
swift-ci
553ec4a48f
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-25 07:14:35 -07:00
Kuba Mracek
bda0c904ef
[embedded] Fix crash when using failable initializers on generic classes
2024-06-24 20:36:02 -07:00
swift-ci
340103be51
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-24 07:55:18 -07:00
Joe Groff
179a1253a7
Merge pull request #74604 from jckarter/conformance-descriptor-invertible-conditional-requirements
...
IRGen: Don't encode conditional requirements to Copyable as normal conformance requirements.
2024-06-24 07:37:33 -07:00
swift-ci
847f915d2e
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-22 07:14:46 -07:00
Adrian Prantl
a03fcb5ff0
Merge pull request #74621 from adrian-prantl/126688061
...
Fix a regression that caused the compiler to drop the path names of g…
2024-06-22 07:14:27 -07:00
swift-ci
4213be1cb9
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-22 02:55:53 -07:00