mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
There is no `%swift-frontend-target` subsitution in test, which is actually `%target-swift-frontend`. The wrong spelling is actually interpreted by lit as `%swift`-frontend-target, and surprising didn't break any tests as the last argument from subsitution is `-define-availability` so it just leads to an very akward availability definition.
20 lines
592 B
Swift
20 lines
592 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -static -emit-module -emit-module-path %t/StaticLibrary.swiftmodule -module-name StaticLibrary -DSTATIC_LIBRARY %s
|
|
// RUN: %target-swift-frontend -I%t -S %s -emit-ir -o - | %FileCheck %s
|
|
|
|
#if STATIC_LIBRARY
|
|
public final class S {
|
|
public init() { }
|
|
deinit {}
|
|
}
|
|
|
|
@_transparent
|
|
public func f() -> S { S() }
|
|
#else
|
|
import StaticLibrary
|
|
internal let s = f()
|
|
#endif
|
|
|
|
// CHECK-NOT: declare dllimport swiftcc ptr @"$s13StaticLibrary1SCACycfC"(ptr swiftself)
|
|
// CHECK: declare swiftcc ptr @"$s13StaticLibrary1SCACycfC"(ptr swiftself)
|