Files
swift-mirror/test/IRGen/static-serialization.swift
Steven Wu 407674ea52 [Test] Fix the wrong subsitution of swift-frontend-target in tests
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.
2023-12-18 16:07:48 -08:00

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)