Files
swift-mirror/test/DebugInfo/closure-arg-linetable.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

22 lines
663 B
Swift

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests %s -emit-ir -g -o - | %FileCheck %s
public class C {
// Test that curry thunks don't have line table entries.
// CHECK: define {{.*}}@_T04main1CC11someHandleryyFTc(%C4main1C*)
// CHECK-SAME: !dbg ![[CURRY_THUNK:[0-9]+]]
// CHECK-NOT: ret {{.*}},
// CHECK: {{.*}}, !dbg ![[DBG:[0-9]+]]
// CHECK: ret {{.*}}, !dbg ![[DBG]]
// CHECK: ![[DBG]] = !DILocation(line: 0, scope: ![[CURRY_THUNK]])
func someHandler() { }
func doSomethingWithHandler(_ theHandler: ((Void) -> Void)!) -> Void {
theHandler()
}
public func entry() {
doSomethingWithHandler(someHandler)
}
}