Files
swift-mirror/test/ModuleInterface/attrs.swift
Jordan Rose 3ea754481e [Frontend] Allow -emit-interface with -typecheck (#19676)
Textual module interfaces don't actually depend on SILGen, so we
shouldn't need to run SILGen (or serialize an entire binary module) if
we're just trying to emit a textual interface. On the other hand, if
we /are/ going to run SILGen and then SIL diagnostics, we shouldn't
delay those diagnostics by spending time emitting a textual interface,
or for that matter a TBD file.

Using this, update all the ModuleInterface tests that use
`-emit-module -o /dev/null` to use `-typecheck` instead, except for
those using `-merge-modules`.
2018-10-03 15:07:31 -07:00

17 lines
604 B
Swift

// RUN: %target-swift-frontend -typecheck -emit-interface-path %t.swiftinterface -enable-resilience %s
// RUN: %FileCheck %s < %t.swiftinterface
// CHECK: @_transparent public func glass() -> Int { return 0 }{{$}}
@_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: {{^}$}}