mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We need @_transparent to control mandatory inlining; @_fixed_layout to control, well, layout; and @_effects to help optimization. We still don't need the ImplicitlyUnwrappedOptional attribute, and we don't need access control attributes (because we handle that uniformly). This also fixes up the printing of the '_effects' attribute to include its underscore, so that it matches the source spelling.
17 lines
606 B
Swift
17 lines
606 B
Swift
// RUN: %target-swift-frontend -emit-interface-path %t.swiftinterface -enable-resilience -emit-module -o /dev/null %s
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
|
|
// CHECK: @_transparent public func glass() -> Int{{$}}
|
|
@_transparent public func glass() -> Int { return 0 }
|
|
|
|
// CHECK: @_effects(readnone) public func illiterate(){{$}}
|
|
@_effects(readnone) public func illiterate() {}
|
|
|
|
// CHECK-LABEL: @_fixed_layout public struct Point {
|
|
@_fixed_layout public struct Point {
|
|
// CHECK-NEXT: public var x: Int
|
|
public var x: Int
|
|
// CHECK-NEXT: public var y: Int
|
|
public var y: Int
|
|
} // CHECK-NEXT: {{^}$}}
|