Dario Rexin
35b2b71475
Merge pull request #74192 from drexin/wip-typed-throws-abi
...
[IRGen] Return typed errors directly in synchronous functions when po…
2024-06-22 02:35:10 -07:00
Adrian Prantl
c9f5af5617
Fix a regression that caused the compiler to drop the path names of generated
...
macro expansion source code when emitting DWARF 4 or earlier.
rdar://126688061
2024-06-21 18:58:11 -07:00
Alex Lorenz
cd1ca50c63
[cxx-interop] ensure that the body of implicit virtual destructor is defined before emitting the clang decl for it
...
This ensures that the destructor definition is emitted into the module's LLVM IR, fixing a linker error.
2024-06-21 17:00:15 -07:00
Dario Rexin
3d4163a319
Address review feedback
2024-06-21 16:00:26 -07:00
Joe Groff
73e4c6fecd
IRGen: Don't encode conditional requirements to Copyable as normal conformance requirements.
...
For new runtimes, this is redundant with the invertible requirement encoding, and for
old runtimes, this breaks dynamic conformance checking because Copyable and Escapable
aren't real protocols on those older runtimes. Fixes rdar://129857284.
2024-06-20 19:01:03 -07:00
Xi Ge
736ccef626
Merge remote-tracking branch 'apple/main' into rebranch
2024-06-20 15:16:55 -07:00
Tim Kientzle
598e5104ef
Merge pull request #74184 from tbkka/tbkka-assertions2
...
Add `#include "swift/Basic/Assertions.h"` to a lot of source files
2024-06-20 12:13:28 -07:00
swift-ci
e4e79345ad
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-19 21:14:11 -07:00
Kuba (Brecka) Mracek
70c54bb739
Merge pull request #74551 from kubamracek/embedded-static-objects
...
[embedded] Enable read-only static array promotion in embedded mode
2024-06-19 21:07:06 -07:00
swift-ci
6952603d83
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-19 16:53:51 -07:00
Arnold Schwaighofer
bddc50ef9e
LargeTypesReg2Mem: Handle mark_dependence
...
This instruction is a no-op. We can just delete it.
rdar://129873110
2024-06-19 09:36:43 -07:00
Kuba Mracek
62d7167c3f
[embedded] Enable read-only static array promotion in embedded mode
2024-06-19 09:16:04 -07:00
Tim Kientzle
1098054291
Merge branch 'main' into tbkka-assertions2
2024-06-18 17:52:00 -07:00
swift-ci
08c89c3ee6
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-18 09:14:51 -07:00
Akira Hatanaka
d92f181ace
Create two versions (for caller and callee) of the functions that answer questions about parameter convention ( #74124 )
...
Create two versions of the following functions:
isConsumedParameter
isGuaranteedParameter
SILParameterInfo::isConsumed
SILParameterInfo::isGuaranteed
SILArgumentConvention::isOwnedConvention
SILArgumentConvention::isGuaranteedConvention
These changes will be needed when we add a new convention for
non-trivial C++ types as the functions will return different answers
depending on whether they are called for the caller or the callee. This
commit doesn't change any functionality.
2024-06-18 09:06:09 -07:00
swift-ci
0bbe4a8055
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-17 10:14:25 -07:00
Egor Zhdan
7c165272c5
Merge pull request #71396 from apple/egorzhdan/cxx-std-function
...
[cxx-interop] Allow initializing `std::function` from Swift closures
2024-06-17 12:31:56 +01:00
Dario Rexin
d9bc2cb2fa
[IRGen] Return typed errors directly in synchronous functions when possible
...
rdar://129359355
This PR implements the basic support for returning typed errors directly and applies it to synchronous functions.
2024-06-14 17:20:01 -07:00
swift-ci
ae025f1950
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-14 08:19:37 -07:00
Kuba (Brecka) Mracek
17eef2733d
Merge pull request #74354 from kubamracek/embedded-float-abi-hard
...
[embedded] Respect float arg lowering convention under -mfloat-abi=hard
2024-06-14 08:07:51 -07:00
swift-ci
b861f5c6f3
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-14 07:15:26 -07:00
Konrad `ktoso` Malawski
2ec717b115
[Concurrency] TaskExecutor ownership fixes ( #74000 )
2024-06-14 22:56:33 +09:00
Arnold Schwaighofer
19557cd6a2
Merge pull request #74304 from aschwaighofer/use_static_alloca_for_stackAlloc
...
IRGen: Use static alloca for builtin stackAlloc when possible
2024-06-14 06:54:41 -07:00
swift-ci
5e95443f0e
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-13 09:34:17 -07:00
Adrian Prantl
fb307ff0a5
Merge pull request #74349 from adrian-prantl/128309024
...
Finalize Swift debug info before running Clang codegen, because it ma…
2024-06-13 09:28:18 -07:00
Egor Zhdan
f56fa41ac6
[cxx-interop] Always instantiate the default destructor
...
This fixes a linker error when using `std::function` from Swift.
rdar://103979602
2024-06-13 16:09:44 +01:00
Kuba Mracek
e871cea025
[embedded] Respect float arg lowering convention under -mfloat-abi=hard
2024-06-12 11:26:02 -07:00
Adrian Prantl
bba8b921ab
Finalize Swift debug info before running Clang codegen, because it may delete
...
the llvm module.
rdar://128309024
2024-06-12 10:13:50 -07:00
swift-ci
3328274e09
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-11 21:34:22 -07:00
Nate Chandler
2d70de8a7f
[IRGen] Assert on retaining noncopyable.
2024-06-11 14:46:03 -07:00
Arnold Schwaighofer
89b6f91a9f
IRGen: Use static alloca for builtin stackAlloc when possible
...
rdar://129599643
2024-06-11 12:14:09 -07:00
swift-ci
b095ea9e1f
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-07 14:54:59 -07:00
Egor Zhdan
dbe1a982d9
Merge pull request #74208 from apple/egorzhdan/frt-duplicate-metadata-accessor
...
[cxx-interop][IRGen] Emit type metadata accessors correctly
2024-06-07 22:49:23 +01:00
Egor Zhdan
a5ce0dc81d
[cxx-interop][IRGen] Emit type metadata accessors correctly
...
This change makes sure we correctly emit IR for type metadata accessors for C++ reference types.
This fixes linker errors when a type metadata of a C++ reference type is used in multiple object files that are later linked together, for instance, if a C++ reference type is conformed to different Swift protocols in different Swift source files:
```
duplicate symbol 'type metadata accessor for __C.SharedObject' in:
main.o
second.o
ld: 1 duplicate symbols
```
rdar://129027705
2024-06-07 19:00:16 +01:00
swift-ci
2cf40fa5f6
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-07 10:14:25 -07:00
Arnold Schwaighofer
83ef1cde73
Merge pull request #74178 from aschwaighofer/objc_clsrolist
...
IRGen: Rename the section pointing to rodata of generic classes to __objc_clsrolist
2024-06-07 09:55:54 -07:00
Arnold Schwaighofer
f063c7e052
IRGen: Rename the section pointing to rodata of generic classes to __objc_clsrolist
...
Also emit it per default.
rdar://129299739
2024-06-06 06:39:26 -07:00
swift-ci
a523f4942e
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-05 20:14:34 -07:00
nate-chandler
40e8b155b0
Merge pull request #73859 from nate-chandler/lifetime-completion/20240523/1
...
[LifetimeCompletion] Mark lifetimes in dead-end loops.
2024-06-05 20:01:45 -07:00
Tim Kientzle
1d961ba22d
Add #include "swift/Basic/Assertions.h" to a lot of source files
...
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
swift-ci
aed40bd421
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-05 19:34:38 -07:00
Artem Chikin
d2ed753d52
Merge pull request #73907 from artemcm/ExplicitAutoLinkScanner
...
[Dependency Scanning] Collect and report each module dependency's Link Libraries
2024-06-05 19:26:34 -07:00
Nate Chandler
2a5d07522d
[SIL] Add extend_lifetime instruction.
...
It indicates that the value's lifetime continues to at least this point.
The boundary formed by all consuming uses together with these
instructions will encompass all uses of the value.
2024-06-05 16:28:26 -07:00
artemcm
d70863501e
[Dependency Scanning] Collect and report each module dependency's Link Libraries
2024-06-05 10:59:41 -07:00
swift-ci
c7472f456f
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-05 08:54:31 -07:00
Pavel Yaskevich
5d243bd8a2
[IRGen] Move marker protocol stripping from mangleTypeSymbol to mangleTypeForFlatUniqueTypeRef
...
The original check introduced by https://github.com/apple/swift/pull/71855
is too broad. For concrete metadata we call the runtime demangler so
we need to strip off marker protocols when mangling that string and
`mangleTypeForReflection` already does that.
2024-06-04 21:58:59 -07:00
Pavel Yaskevich
552749e2f3
[IRGen] Strip marker protocols when forming generic metadata requests
...
Without this might might end up with a single element protocol compositions
which are invalid.
2024-06-04 14:28:14 -07:00
swift-ci
66a4c36346
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-03 03:36:17 -07:00
Kuba Mracek
399dbc97d5
[embedded] In -emit-empty-object-file mode, don't emit autolink entries
2024-06-01 10:20:18 -07:00
swift-ci
d23bfc9e6a
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-31 15:56:17 -07:00