Skip to content

Commit 01431b8

Browse files
committed
Make @abi non-experimental
This includes changing the feature name so that compilers with the experimental feature don’t accidentally pick up content that only works in the final version. Resolves rdar://150065196.
1 parent 0c508a8 commit 01431b8

17 files changed

+48
-54
lines changed

include/swift/AST/DeclAttr.def

-1
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,6 @@ DECL_ATTR(abi, ABI,
861861
OnConstructor | OnFunc | OnSubscript | OnVar,
862862
LongAttribute | ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove | ForbiddenInABIAttr,
863863
165)
864-
DECL_ATTR_FEATURE_REQUIREMENT(ABI, ABIAttribute)
865864

866865
// Unused '166': Used to be `@execution(caller | concurrent)` replaced with `@concurrent` and `nonisolated(nonsending)`
867866

include/swift/Basic/Features.def

+1-3
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ LANGUAGE_FEATURE(AsyncExecutionBehaviorAttributes, 0, "@concurrent and nonisolat
258258
LANGUAGE_FEATURE(IsolatedConformances, 407, "Global-actor isolated conformances")
259259
LANGUAGE_FEATURE(ValueGenericsNameLookup, 452, "Value generics appearing as static members for namelookup")
260260
LANGUAGE_FEATURE(GeneralizedIsSameMetaTypeBuiltin, 465, "Builtin.is_same_metatype with support for noncopyable/nonescapable types")
261+
SUPPRESSIBLE_LANGUAGE_FEATURE(ABIAttributeSE0479, 479, "@abi attribute on functions, initializers, properties, and subscripts")
261262

262263
// Swift 6
263264
UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
@@ -483,9 +484,6 @@ EXPERIMENTAL_FEATURE(CoroutineAccessorsUnwindOnCallerError, false)
483484
EXPERIMENTAL_FEATURE(AddressableParameters, true)
484485
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(AddressableTypes, true)
485486

486-
/// Allow the @abi attribute.
487-
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(ABIAttribute, true)
488-
489487
/// Allow custom availability domains to be defined and referenced.
490488
EXPERIMENTAL_FEATURE(CustomAvailability, true)
491489

lib/AST/ASTPrinter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3283,8 +3283,8 @@ suppressingFeatureCoroutineAccessors(PrintOptions &options,
32833283
}
32843284

32853285
static void
3286-
suppressingFeatureABIAttribute(PrintOptions &options,
3287-
llvm::function_ref<void()> action) {
3286+
suppressingFeatureABIAttributeSE0479(PrintOptions &options,
3287+
llvm::function_ref<void()> action) {
32883288
llvm::SaveAndRestore<bool> scope1(options.PrintSyntheticSILGenName, true);
32893289
ExcludeAttrRAII scope2(options.ExcludeAttrList, DeclAttrKind::ABI);
32903290
action();

lib/AST/FeatureSet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static ABIAttr *getABIAttr(Decl *decl) {
387387
return decl->getAttrs().getAttribute<ABIAttr>();
388388
}
389389

390-
static bool usesFeatureABIAttribute(Decl *decl) {
390+
static bool usesFeatureABIAttributeSE0479(Decl *decl) {
391391
return getABIAttr(decl) != nullptr;
392392
}
393393

lib/ASTGen/Sources/ASTGen/SourceFile.swift

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ extension Parser.ExperimentalFeatures {
7575
mapFeature(.NonescapableTypes, to: .nonescapableTypes)
7676
mapFeature(.TrailingComma, to: .trailingComma)
7777
mapFeature(.CoroutineAccessors, to: .coroutineAccessors)
78-
mapFeature(.ABIAttribute, to: .abiAttribute)
7978
mapFeature(.OldOwnershipOperatorSpellings, to: .oldOwnershipOperatorSpellings)
8079
mapFeature(.KeyPathWithMethodMembers, to: .keypathWithMethodMembers)
8180
mapFeature(.InlineArrayTypeSugar, to: .inlineArrayTypeSugar)

test/ASTGen/attrs.swift

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %empty-directory(%t)
22

33
// RUN: %target-swift-frontend-dump-parse \
4-
// RUN: -enable-experimental-feature ABIAttribute \
54
// RUN: -enable-experimental-feature Extern \
65
// RUN: -enable-experimental-feature LifetimeDependence \
76
// RUN: -enable-experimental-feature RawLayout \
@@ -12,7 +11,6 @@
1211
// RUN: | %sanitize-address > %t/astgen.ast
1312

1413
// RUN: %target-swift-frontend-dump-parse \
15-
// RUN: -enable-experimental-feature ABIAttribute \
1614
// RUN: -enable-experimental-feature Extern \
1715
// RUN: -enable-experimental-feature LifetimeDependence \
1816
// RUN: -enable-experimental-feature RawLayout \
@@ -26,7 +24,6 @@
2624
// RUN: %target-typecheck-verify-swift \
2725
// RUN: -module-abi-name ASTGen \
2826
// RUN: -enable-experimental-feature ParserASTGen \
29-
// RUN: -enable-experimental-feature ABIAttribute \
3027
// RUN: -enable-experimental-feature Extern \
3128
// RUN: -enable-experimental-feature LifetimeDependence \
3229
// RUN: -enable-experimental-feature RawLayout \
@@ -38,7 +35,6 @@
3835
// REQUIRES: executable_test
3936
// REQUIRES: swift_swift_parser
4037
// REQUIRES: swift_feature_ParserASTGen
41-
// REQUIRES: swift_feature_ABIAttribute
4238
// REQUIRES: swift_feature_Extern
4339
// REQUIRES: swift_feature_LifetimeDependence
4440
// REQUIRES: swift_feature_RawLayout

test/IDE/complete_decl_attribute.swift

+17
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=KEYWORD_INDEPENDENT_2 | %FileCheck %s -check-prefix=KEYWORD_LAST
2020
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=KEYWORD_LAST | %FileCheck %s -check-prefix=KEYWORD_LAST
2121

22+
// NOTE: If you want to test code completion for an experimental feature, please
23+
// put your tests in complete_decl_attribute_feature_requirement.swift, not
24+
// here. That file has the infrastructure to test that completions are not
25+
// offered when the feature is disabled.
26+
2227
struct MyStruct {}
2328

2429
@propertyWrapper
@@ -112,6 +117,7 @@ actor MyGenericGlobalActor<T> {
112117
// KEYWORD2-NEXT: Keyword/None: preconcurrency[#Func Attribute#]; name=preconcurrency
113118
// KEYWORD2-NEXT: Keyword/None: backDeployed[#Func Attribute#]; name=backDeployed
114119
// KEYWORD2-NEXT: Keyword/None: lifetime[#Func Attribute#]; name=lifetime
120+
// KEYWORD2-NEXT: Keyword/None: abi[#Func Attribute#]; name=abi{{$}}
115121
// KEYWORD2-NEXT: Keyword/None: concurrent[#Func Attribute#]; name=concurrent
116122
// KEYWORD2-NOT: Keyword
117123
// KEYWORD2-DAG: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
@@ -169,6 +175,7 @@ actor MyGenericGlobalActor<T> {
169175
// KEYWORD5-NEXT: Keyword/None: preconcurrency[#Struct Attribute#]; name=preconcurrency
170176

171177
@#^ON_GLOBALVAR^# var globalVar
178+
// ON_GLOBALVAR-DAG: Keyword/None: abi[#Var Attribute#]; name=abi
172179
// ON_GLOBALVAR-DAG: Keyword/None: available[#Var Attribute#]; name=available
173180
// ON_GLOBALVAR-DAG: Keyword/None: objc[#Var Attribute#]; name=objc
174181
// ON_GLOBALVAR-DAG: Keyword/None: NSCopying[#Var Attribute#]; name=NSCopying
@@ -197,6 +204,7 @@ actor MyGenericGlobalActor<T> {
197204

198205
struct _S {
199206
@#^ON_INIT^# init()
207+
// ON_INIT-DAG: Keyword/None: abi[#Constructor Attribute#]; name=abi
200208
// ON_INIT-DAG: Keyword/None: available[#Constructor Attribute#]; name=available
201209
// ON_INIT-DAG: Keyword/None: objc[#Constructor Attribute#]; name=objc
202210
// ON_INIT-DAG: Keyword/None: inline[#Constructor Attribute#]; name=inline
@@ -207,6 +215,7 @@ struct _S {
207215
// ON_INIT-DAG: Keyword/None: preconcurrency[#Constructor Attribute#]; name=preconcurrency
208216

209217
@#^ON_PROPERTY^# var foo
218+
// ON_PROPERTY-DAG: Keyword/None: abi[#Var Attribute#]; name=abi
210219
// ON_PROPERTY-DAG: Keyword/None: available[#Var Attribute#]; name=available
211220
// ON_PROPERTY-DAG: Keyword/None: objc[#Var Attribute#]; name=objc
212221
// ON_PROPERTY-DAG: Keyword/None: NSCopying[#Var Attribute#]; name=NSCopying
@@ -234,8 +243,12 @@ struct _S {
234243
// ON_PROPERTY-DAG: Decl[Actor]/CurrModule/TypeRelation[Convertible]: MyGenericGlobalActor[#Global Actor#]; name=MyGenericGlobalActor
235244
// ON_PROPERTY-NOT: Decl[PrecedenceGroup]
236245

246+
@#^ON_SUBSCR^# subscript
247+
// ON_SUBSCR-DAG: Keyword/None: abi[#Declaration Attribute#]; name=abi
248+
237249
@#^ON_METHOD^# private
238250
func foo()
251+
// ON_METHOD-DAG: Keyword/None: abi[#Func Attribute#]; name=abi
239252
// ON_METHOD-DAG: Keyword/None: available[#Func Attribute#]; name=available
240253
// ON_METHOD-DAG: Keyword/None: objc[#Func Attribute#]; name=objc
241254
// ON_METHOD-DAG: Keyword/None: IBAction[#Func Attribute#]; name=IBAction
@@ -293,6 +306,7 @@ struct _S {
293306

294307

295308
@#^ON_MEMBER_LAST^#
309+
// ON_MEMBER_LAST-DAG: Keyword/None: abi[#Declaration Attribute#]; name=abi
296310
// ON_MEMBER_LAST-DAG: Keyword/None: available[#Declaration Attribute#]; name=available
297311
// ON_MEMBER_LAST-DAG: Keyword/None: objc[#Declaration Attribute#]; name=objc
298312
// ON_MEMBER_LAST-DAG: Keyword/None: dynamicCallable[#Declaration Attribute#]; name=dynamicCallable
@@ -347,6 +361,8 @@ func takeClosure(_: () -> Void) {
347361
print("x")
348362
}
349363
}
364+
// FIXME: Not valid in this position (but CompletionLookup can't tell that)
365+
// IN_CLOSURE-DAG: Keyword/None: abi[#Declaration Attribute#]; name=abi
350366
// FIXME: We should mark MyPropertyWrapper and MyResultBuilder as Unrelated
351367
// IN_CLOSURE-DAG: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
352368
// IN_CLOSURE-DAG: Decl[Struct]/CurrModule/TypeRelation[Convertible]: MyPropertyWrapper[#Property Wrapper#]; name=MyPropertyWrapper
@@ -365,6 +381,7 @@ func dummy2() {}
365381

366382
@#^KEYWORD_LAST^#
367383

384+
// KEYWORD_LAST-DAG: Keyword/None: abi[#Declaration Attribute#]; name=abi
368385
// KEYWORD_LAST-DAG: Keyword/None: available[#Declaration Attribute#]; name=available{{$}}
369386
// KEYWORD_LAST-DAG: Keyword/None: freestanding[#Declaration Attribute#]; name=freestanding{{$}}
370387
// KEYWORD_LAST-DAG: Keyword/None: objc[#Declaration Attribute#]; name=objc{{$}}

test/IDE/complete_decl_attribute_feature_requirement.swift

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// it's enabled. When a feature becomes non-experimental, move its test cases
44
// into the normal complete_decl_attribute.swift test file.
55

6+
// NOTE: There are currently no experimental features that need code completion
7+
// testing, but this test file is being left in place for when it's needed
8+
// again. At that time, please remove the ABIAttribute tests.
9+
// REQUIRES: new_use_case
10+
611
// REQUIRES: asserts
712

813
// RUN: %batch-code-completion -filecheck-additional-suffix _DISABLED

test/IRGen/asmname.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: %target-swift-frontend -enable-experimental-feature ABIAttribute %s -emit-ir > %t.ir
1+
// RUN: %target-swift-frontend %s -emit-ir > %t.ir
22
// RUN: %FileCheck --input-file %t.ir %s
33
// RUN: %FileCheck --check-prefix NEGATIVE --input-file %t.ir %s
44

55
// REQUIRES: CPU=i386 || CPU=x86_64 || CPU=arm64
6-
// REQUIRES: swift_feature_ABIAttribute
76

87
// Non-Swift _silgen_name definitions
98

test/Macros/macro_expand.swift

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
// REQUIRES: swift_swift_parser, executable_test
2-
// REQUIRES: swift_feature_ABIAttribute
32

43
// RUN: %empty-directory(%t)
54
// RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift
65

76
// Diagnostics testing
8-
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -enable-experimental-feature ABIAttribute
7+
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS
98

109
// Diagnostics testing by importing macros from a module
1110
// RUN: %target-swift-frontend -swift-version 5 -emit-module -o %t/freestanding_macro_library.swiftmodule %S/Inputs/freestanding_macro_library.swift -module-name freestanding_macro_library -load-plugin-library %t/%target-library-name(MacroDefinition)
1211
// RUN: %target-swift-frontend -swift-version 5 -emit-module -o %t/freestanding_macro_library_2.swiftmodule %S/Inputs/freestanding_macro_library_2.swift -module-name freestanding_macro_library_2 -load-plugin-library %t/%target-library-name(MacroDefinition) -I %t
1312

14-
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -I %t -DIMPORT_MACRO_LIBRARY -enable-experimental-feature ABIAttribute
13+
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -I %t -DIMPORT_MACRO_LIBRARY
1514

16-
// RUN: not %target-swift-frontend -swift-version 5 -typecheck -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -serialize-diagnostics-path %t/macro_expand.dia %s -emit-macro-expansion-files no-diagnostics -Rmacro-loading > %t/macro-printing.txt -enable-experimental-feature ABIAttribute
15+
// RUN: not %target-swift-frontend -swift-version 5 -typecheck -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -serialize-diagnostics-path %t/macro_expand.dia %s -emit-macro-expansion-files no-diagnostics -Rmacro-loading > %t/macro-printing.txt
1716
// RUN: c-index-test -read-diagnostics %t/macro_expand.dia 2>&1 | %FileCheck -check-prefix CHECK-DIAGS -dump-input=always %s
1817

1918
// RUN: %FileCheck %s --check-prefix CHECK-MACRO-PRINTED < %t/macro-printing.txt
2019

21-
// RUN: not %target-swift-frontend -swift-version 5 -typecheck -diagnostic-style=swift -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS %s -enable-experimental-feature ABIAttribute > %t/pretty-macro-diagnostics.txt 2>&1
20+
// RUN: not %target-swift-frontend -swift-version 5 -typecheck -diagnostic-style=swift -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS %s > %t/pretty-macro-diagnostics.txt 2>&1
2221
// RUN: %FileCheck %s --check-prefix PRETTY-DIAGS < %t/pretty-macro-diagnostics.txt
2322

2423
// Debug info SIL testing

test/Macros/macro_expand_peers.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// REQUIRES: swift_swift_parser, executable_test
2-
// REQUIRES: swift_feature_ABIAttribute
32

43
// For _Concurrency.
54
// UNSUPPORTED: use_os_stdlib
65
// UNSUPPORTED: back_deployment_runtime
76

87
// RUN: %empty-directory(%t)
98
// RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -parse-as-library -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath
10-
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -parse-as-library -disable-availability-checking -enable-experimental-feature ABIAttribute -DTEST_DIAGNOSTICS
9+
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -parse-as-library -disable-availability-checking -DTEST_DIAGNOSTICS
1110

1211
// Check with the imported macro library vs. the local declaration of the macro.
1312
// RUN: %target-swift-frontend -swift-version 5 -emit-module -o %t/macro_library.swiftmodule %S/Inputs/macro_library.swift -module-name macro_library -load-plugin-library %t/%target-library-name(MacroDefinition)
1413

15-
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -parse-as-library -disable-availability-checking -DIMPORT_MACRO_LIBRARY -I %t -enable-experimental-feature ABIAttribute -DTEST_DIAGNOSTICS
14+
// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -parse-as-library -disable-availability-checking -DIMPORT_MACRO_LIBRARY -I %t -DTEST_DIAGNOSTICS
1615

1716

1817
// RUN: %target-swift-frontend -swift-version 5 -typecheck -load-plugin-library %t/%target-library-name(MacroDefinition) -parse-as-library %s -disable-availability-checking -dump-macro-expansions > %t/expansions-dump.txt 2>&1

test/ModuleInterface/attrs.swift

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs \
2-
// RUN: -emit-private-module-interface-path %t.private.swiftinterface \
3-
// RUN: -enable-experimental-feature ABIAttribute
2+
// RUN: -emit-private-module-interface-path %t.private.swiftinterface
43

54
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs
65
// RUN: %target-swift-typecheck-module-from-interface(%t.private.swiftinterface) -module-name attrs
76

87
// RUN: %FileCheck %s --check-prefixes CHECK,PUBLIC-CHECK --input-file %t.swiftinterface
98
// RUN: %FileCheck %s --check-prefixes CHECK,PRIVATE-CHECK --input-file %t.private.swiftinterface
109

11-
// REQUIRES: swift_feature_ABIAttribute
12-
1310
// CHECK: @_transparent public func glass() -> Swift.Int { return 0 }{{$}}
1411
@_transparent public func glass() -> Int { return 0 }
1512

@@ -38,7 +35,7 @@ internal func __specialize_someGenericFunction<T>(_ t: T) -> Int {
3835

3936
@abi(func __abi__abiAttrOnFunction(param: Int))
4037
public func abiAttrOnFunction(param: Int) {}
41-
// CHECK: #if {{.*}} $ABIAttribute
38+
// CHECK: #if {{.*}} $ABIAttributeSE0479
4239
// CHECK: @abi(func __abi__abiAttrOnFunction(param: Swift.Int))
4340
// CHECK: public func abiAttrOnFunction(param: Swift.Int)
4441
// CHECK: #else
@@ -48,7 +45,7 @@ public func abiAttrOnFunction(param: Int) {}
4845

4946
@abi(let __abi__abiAttrOnVar: Int)
5047
public var abiAttrOnVar: Int = 42
51-
// CHECK: #if {{.*}} $ABIAttribute
48+
// CHECK: #if {{.*}} $ABIAttributeSE0479
5249
// CHECK: @abi(var __abi__abiAttrOnVar: Swift.Int)
5350
// CHECK: public var abiAttrOnVar: Swift.Int
5451
// CHECK: #else
@@ -57,7 +54,7 @@ public var abiAttrOnVar: Int = 42
5754
// CHECK: #endif
5855

5956
public struct MutatingTest {
60-
// CHECK: #if {{.*}} $ABIAttribute
57+
// CHECK: #if {{.*}} $ABIAttributeSE0479
6158
// CHECK: @abi(mutating func abiMutFunc())
6259
// CHECK: public mutating func abiMutFunc()
6360
// CHECK: #else
@@ -68,14 +65,14 @@ public struct MutatingTest {
6865
public mutating func abiMutFunc() {}
6966
}
7067

71-
// PUBLIC-CHECK-NOT: #if {{.*}} $ABIAttribute
68+
// PUBLIC-CHECK-NOT: #if {{.*}} $ABIAttributeSE0479
7269
// PUBLIC-CHECK-NOT: @abi(func abiSpiFunc())
7370
// PUBLIC-CHECK-NOT: public func abiSpiFunc()
7471
// PUBLIC-CHECK-NOT: #else
7572
// PUBLIC-CHECK-NOT: @_silgen_name("$s5attrs10abiSpiFuncyyF")
7673
// PUBLIC-CHECK-NOT: public func abiSpiFunc()
7774
// PUBLIC-CHECK-NOT: #endif
78-
// PRIVATE-CHECK: #if {{.*}} $ABIAttribute
75+
// PRIVATE-CHECK: #if {{.*}} $ABIAttributeSE0479
7976
// PRIVATE-CHECK: @abi(func abiSpiFunc())
8077
// PRIVATE-CHECK: public func abiSpiFunc()
8178
// PRIVATE-CHECK: #else
@@ -88,7 +85,7 @@ public struct MutatingTest {
8885
// We should print feature guards outside, but not inside, an @abi attribute.
8986
@abi(func sendingABI() -> sending Any?)
9087
public func sendingABI() -> Any? { nil }
91-
// CHECK: #if {{.*}} && $ABIAttribute
88+
// CHECK: #if {{.*}} && $ABIAttributeSE0479
9289
// CHECK: @abi(func sendingABI() -> sending Any?)
9390
// CHECK: public func sendingABI() -> Any?
9491
// CHECK: #elseif {{.*}} && $SendingArgsAndResults

test/ModuleInterface/attrs_objc.swift

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s \
2-
// RUN: -enable-objc-interop -module-name attrs_objc \
3-
// RUN: -enable-experimental-feature ABIAttribute
2+
// RUN: -enable-objc-interop -module-name attrs_objc
43

54
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs_objc
65

76
// RUN: %FileCheck %s --input-file %t.swiftinterface
87

98
// REQUIRES: objc_interop
10-
// REQUIRES: swift_feature_ABIAttribute
119

1210
import Foundation
1311

1412
@objcMembers
1513
public class ObjCTest: NSObject {
16-
// CHECK: #if {{.*}} $ABIAttribute
14+
// CHECK: #if {{.*}} $ABIAttributeSE0479
1715
// CHECK: @abi(func abiObjCFunc())
1816
// CHECK: @objc public func abiObjCFunc()
1917
// CHECK: #else
@@ -23,7 +21,7 @@ public class ObjCTest: NSObject {
2321
@abi(func abiObjCFunc())
2422
@objc public func abiObjCFunc() {}
2523

26-
// CHECK: #if {{.*}} $ABIAttribute
24+
// CHECK: #if {{.*}} $ABIAttributeSE0479
2725
// CHECK: @abi(func abiImplicitObjCFunc())
2826
// CHECK: @objc public func abiImplicitObjCFunc()
2927
// CHECK: #else
@@ -33,7 +31,7 @@ public class ObjCTest: NSObject {
3331
@abi(func abiImplicitObjCFunc())
3432
public func abiImplicitObjCFunc() {}
3533

36-
// CHECK: #if {{.*}} $ABIAttribute
34+
// CHECK: #if {{.*}} $ABIAttributeSE0479
3735
// CHECK: @abi(func abiIBActionFunc(_: Any))
3836
// CHECK: @objc @IBAction @_Concurrency.MainActor @preconcurrency public func abiIBActionFunc(_: Any)
3937
// CHECK: #else

0 commit comments

Comments
 (0)