Files
swift-mirror/test/DebugInfo/capturelist.swift
Arnold Schwaighofer d981bb1d96 Mangling: noescape functions will be trivial and no longer compatible with escape function types.
Mangle escapeness as part of the type.

Part of:
SR-5441
rdar://36116691
2018-02-06 08:51:43 -08:00

21 lines
556 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
class C {
func withClosure(_ : () -> ()) -> () {}
func f() {
// CHECK: define{{.*}}$S11capturelist1CC1fyyFyyXEfU_
// There should not be a local weak variable "self" shadowing the
// implicit self argument.
// let self
// CHECK: call void @llvm.dbg
// let s
// CHECK: call void @llvm.dbg
// var weak self
// CHECK-NOT: call void @llvm.dbg
// CHECK: ret void
withClosure { [weak self] in
guard let s = self else { return }
}
}
}