Files
swift-mirror/test/ModuleInterface/attrs.swift
Jordan Rose 7046980f99 [ModuleInterface] Print normally unprinted attributes
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.
2018-08-20 18:30:01 -07:00

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: {{^}$}}