blob: cbbb0b6d18c1c58ad9684ed72263e6c2775f9b06 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -DMODULE %s -O -emit-sil | %FileCheck %s
// Also link to make sure we don't eliminate any needed symbols.
// RUN: %target-swift-frontend -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -DMODULE %s -O -c -o module.o
// RUN: %target-build-swift -DMAIN %s -I%t -O -o %t/a.out
#if MODULE
// Check if the optimizer eliminates testit() in Module.
// CHECK-NOT: {{sil .*testit.*}}
@_alwaysEmitIntoClient
@inline(never)
public func testit() {
print("hello")
}
#endif
#if MAIN
import Module
public func caller() {
testit()
}
#endif