-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66479 from adrian-prantl/110329894
Avoid emitting variable debug info for closure captures. … @adrian-prantl
- Loading branch information
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// RUN: %target-swift-frontend %s -parse-as-library -module-name a -emit-sil -g -o - | %FileCheck %s | ||
struct S {} | ||
public class UIView {} | ||
public protocol View {} | ||
public final class Signal<Value> { | ||
public func map<U>(_ transform: @escaping (Value) -> U) -> Signal<U> { | ||
return Signal<U>() | ||
} | ||
} | ||
public final class C<V: View, V1: View>: UIView { | ||
private let t1: C<V, V1>? = nil | ||
private let t2: C<V1, V>? = nil | ||
func foo() -> Signal<(S, UIView)> { | ||
// CHECK: sil {{.*}}s1a1CC3foo | ||
// CHECK: debug_value {{.*}} name "self" | ||
// CHECK-NOT: debug_value {{.*}} name "view" | ||
// CHECK: return % | ||
return ( | ||
Signal<S>() | ||
.map { [view = t1!] in ($0, view) }, | ||
Signal<S>() | ||
.map { [view = t2!] in ($0, view) } | ||
).0 | ||
} | ||
} | ||
|