Commit Graph

14 Commits

Author SHA1 Message Date
Allan Shortlidge
c02fc4724d Tests: Remove -disable-availability-checking from many Concurrency tests.
Instead, use the `%target-swift-5.1-abi-triple` substitution to compile the tests
for deployment to the minimum OS versions required for use of _Concurrency APIs.
2024-10-18 16:21:51 -07:00
Allan Shortlidge
082f0ac4b5 Tests: Use a more natural spelling for ABI triple lit substitutions.
`%target-swift-5.8-abi-triple` instead of `%target-swift-abi-5.8-triple`, for
example.
2024-10-18 10:11:36 -07:00
Michael Gottesman
026f1735b5 [send-non-sendable] Update concurrency tests so that we run them in all concurrency modes as appropriate.
This means that:

1. In test cases where minimal is the default (swift 5 without
-warn-concurrency), I added RUN lines for targeted, complete, and complete +
sns.

2. In test cases where complete is the default (swift 6, -warn-concurrency,
specified complete with -strict-concurrency), I added a send non-sendable run
line.

In each of these cases, I added additional expected-* lines as appropriate so
the tests can compile in each mode successfully.
2023-08-30 13:40:17 -07:00
Arnold Schwaighofer
086bc944f0 IRGen: Only use clang protocol emission on newer deployment targets
We started using clang to emit the _OBJC_PROTOCOL_ definition.

But we would use a different name for the proto_list definition than clang.

"OBJC_LABEL_PROTOCOL$" (objc)
|--> OBJC_PROTOCOL
"\01l_OBJC_LABEL_PROTOCOL$_" (swift)
|--> OBJC_PROTOCOL

If an Objective C object also emitted the same protocol definition you could
end up in a situation where both clang's and swift's proto_list definitions
point to the same protocol definition.

Older linkers don't like that.

rdar://108505376
2023-05-01 13:49:17 -07:00
Arnold Schwaighofer
f403e55a1d Revert "Merge pull request #65516 from aschwaighofer/guard_using_clang_for_objc_protocols_by_deploy_target"
This reverts commit 1a7f342a4e, reversing
changes made to 404b925d8b.
2023-05-01 07:43:56 -07:00
Arnold Schwaighofer
4416cb3f9b IRGen: only use clang protocol emission on newer deployment targets
Older linkers seemed to have a problem with clang emitted definitions.

rdar://108505376
2023-04-28 15:10:47 -07:00
Arnold Schwaighofer
ba9578d6ce IRGen: Use clang's codegen for protocol decls
There are certain protocol method decls types that swift does not import
today.

```
@protocol Incomplete
- (id)getObjectFromVarArgs:(id)first, ...;
@end
```

Furthermore, the old method also emitted duplicate entries for protocols
methods when Swift synthesized methods for diagnosics.

We won't import this method into Swift. So if we emit protocol metadata
from swift delcs we would generate incomplete records.

rdar://60888524
2022-10-26 12:34:25 -07:00
Arnold Schwaighofer
7fd49f1697 IRGen: Default to weak hidden instead of internal linkage for objc metadata
This extends #39944 to apply to more objc metadata.

rdar://85037490
2021-12-10 07:26:00 -08:00
Arnold Schwaighofer
fab112fb1e Revert "Merge pull request #40342 from aschwaighofer/make_objc_metadata_weak_hidden"
This reverts commit 4323d2fa26, reversing
changes made to 451b902cd5.

This caused linking errors on the swift source compat suite in the
Sourcery project.

rdar://86256970
2021-12-09 08:01:27 -08:00
Arnold Schwaighofer
f8d009e05f IRGen: Default to weak hidden instead of internal linkage for objc metadata
This extends #39944 to apply to more objc metadata.

rdar://85037490
2021-12-02 12:56:50 -08:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Andrew Trick
45f74a1819 Fix test/Concurrency/objc_async_protocol_irgen.swift for 32-bit
This test was introduced without 32-bit testing.
2021-04-09 00:22:23 -07:00
Varun Gandhi
b6ed507c13 [Concurrency] Emit async methods in ObjC protocols once.
Previously, the method table would contain duplicate copies due to the
ProtocolDecl carrying a completionHandler-based version of the method,
as well as the async version of the method.

Fixes rdar://76192003.
2021-04-08 16:26:31 -07:00