mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
@noescape may be interesting to passes in the future, but it currently has no effect except to cause symbol collisions in reabstraction thunks and other places. Since it has no effect, just remove it from SIL for now. Swift SVN r24925
24 lines
615 B
Swift
24 lines
615 B
Swift
// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
|
|
|
|
struct S {}
|
|
|
|
func noescape_concrete(@noescape x: S -> S) {
|
|
noescape_generic(x)
|
|
}
|
|
|
|
func noescape_generic<T>(@noescape x: T -> T) {
|
|
}
|
|
|
|
// CHECK-LABEL: sil hidden @_TF22noescape_reabstraction17noescape_concreteFFVS_1SS0_T_
|
|
// CHECK: function_ref [[REABSTRACTION_THUNK:@_TTRXFo_dV22noescape_reabstraction1S_dS0__XFo_iS0__iS0__]]
|
|
|
|
func concrete(x: S -> S) {
|
|
noescape_generic(x)
|
|
}
|
|
|
|
func generic<T>(x: T -> T) {
|
|
}
|
|
|
|
// CHECK-LABEL: sil hidden @_TF22noescape_reabstraction8concreteFFVS_1SS0_T_
|
|
// CHECK: function_ref [[REABSTRACTION_THUNK]]
|