Files
swift-mirror/test/DebugInfo/thunks.swift
Joe Groff 0cd5aa8c7c Change mangling for the Swift module from 'Ss' to 's'.
'Ss' appears in manglings tens of thousands of times in the standard library and is also incredibly frequent in other modules. This alone is enough to shrink the standard library by 59KB.

Swift SVN r32409
2015-10-02 22:39:44 +00:00

27 lines
891 B
Swift

// RUN: %target-swift-frontend -emit-ir -g %s -o - | FileCheck %s
// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -g %s -o - | FileCheck %s --check-prefix=SIL-CHECK
// REQUIRES: objc_interop
import Foundation
class Foo : NSObject {
dynamic func foo(f: Int64 -> Int64, x: Int64) -> Int64 {
return f(x)
}
}
let foo = Foo()
let y = 3 as Int64
let i = foo.foo(-, x: y)
// CHECK: define {{.*}}@_TTRXFdCb_dVs5Int64_dS__XFo_dS__dS__
// CHECK-NOT: ret
// CHECK: call {{.*}}, !dbg ![[LOC:.*]]
// CHECK: ![[THUNK:.*]] = distinct !DISubprogram(linkageName: "_TTRXFdCb_dVs5Int64_dS__XFo_dS__dS__"
// CHECK-NOT: line:
// CHECK-SAME: ){{$}}
// CHECK: ![[LOC]] = !DILocation(line: 0, scope: ![[THUNK]])
// SIL-CHECK: sil shared {{.*}}@_TTRXFdCb_dVs5Int64_dS__XFo_dS__dS__
// SIL-CHECK-NOT: return
// SIL-CHECK: apply {{.*}}auto_gen