Files
swift-mirror/test/SILOptimizer/capture_propagation_linkage.swift
Dmitri Gribenko 486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00

23 lines
638 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-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()
}