Files
swift-mirror/test/SILGen/noescape_reabstraction.swift
Joe Groff d523ad07e6 SIL: Don't lower the @noescape attribute from the AST to SILFunctionType.
@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
2015-02-03 20:35:05 +00:00

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]]