Files
swift-mirror/test/SILOptimizer/capture_propagation_linkage.swift
2018-08-10 06:58:40 -07:00

24 lines
672 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %S/Inputs/capture_propagation_linkage/main.swift %s -O -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// CHECK: test ok
// Capture propagation specializes the reabstraction thunk for createInstance
// and for main.createNil().
//
// We used to have a problem which caused us to mark these as private
// since both would produce the same name. Now we no longer have this
// problem due to the new mangler.
func createSome() -> MyClass? {
return genericCaller(createInstance)
}
func createInstance() -> MyClass? {
return MyClass()
}