mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE). This is the final step of rdar://problem/20434113. Swift SVN r27925
19 lines
604 B
Swift
19 lines
604 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
class Foo
|
|
{
|
|
func DefinesClosure (a_string : String) -> () -> String
|
|
{
|
|
// Verify that we only emit the implicit argument,
|
|
// and not the unowned local copy of self.
|
|
//
|
|
// CHECK-NOT: !DILocalVariable(tag: DW_TAG_auto_variable, name: "self"
|
|
// CHECK: !DILocalVariable(tag: DW_TAG_arg_variable, name: "self"
|
|
// CHECK-NOT: !DILocalVariable(tag: DW_TAG_auto_variable, name: "self"
|
|
return { [unowned self] in
|
|
var tmp_string = a_string
|
|
return tmp_string
|
|
}
|
|
}
|
|
}
|