Skip to content

Commit 766d42b

Browse files
Merge pull request #73340 from adrian-prantl/127095833-6.0
Emit line table entries for closure setup instructions.
2 parents 20d9ece + 5bb50c0 commit 766d42b

File tree

4 files changed

+7
-43
lines changed

4 files changed

+7
-43
lines changed

lib/SILGen/SILGenExpr.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,9 +3049,8 @@ RValueEmitter::emitClosureReference(AbstractClosureExpr *e,
30493049

30503050
// Generate the closure value (if any) for the closure expr's function
30513051
// reference.
3052-
SILLocation L = e;
3053-
L.markAutoGenerated();
3054-
return SGF.emitClosureValue(L, SILDeclRef(e), contextInfo, subs);
3052+
SILLocation loc = e;
3053+
return SGF.emitClosureValue(loc, SILDeclRef(e), contextInfo, subs);
30553054
}
30563055

30573056
RValue RValueEmitter::

test/DebugInfo/linetable-assign.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
public func g<T>(_ t: T) {}
55
public func f(_ i: Int32) {
66
// CHECK: function_ref @$s4main1fyys5Int32VFyycfU_
7-
// CHECK-SAME: loc * "{{.*}}":13:3,
7+
// CHECK-SAME: loc "{{.*}}":13:3,
88
// CHECK: %[[CLOSURE:.*]] = partial_apply
9-
// CHECK-SAME: loc * "{{.*}}":13:3,{{.*}}auto_gen
9+
// CHECK-SAME: loc "{{.*}}":13:3,
1010
// CHECK: store %[[CLOSURE]]
11-
// CHECK-SAME: loc "{{.*}}":13:3,
11+
// CHECK-SAME: loc "{{.*}}":13:3,
1212
var closure = // line 12
13-
{ // FIXME: Shoudll the store be associated with line 12?
13+
{
1414
g(i)
1515
}
1616
return closure()

test/SILGen/sil_locations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func captures_tuple<T, U>(x: (T, U)) -> () -> (T, U) {
213213
// CHECK-LABEL: sil hidden [ossa] @$s13sil_locations14captures_tuple{{[_0-9a-zA-Z]*}}F
214214
// CHECK: tuple_element_addr {{.*}}, loc "{{.*}}":[[@LINE-3]]:27
215215
// CHECK: copy_addr {{.*}}, loc "{{.*}}":[[@LINE-4]]:27
216-
// CHECK: function_ref {{.*}}, loc * "{{.*}}":[[@LINE-4]]:10
216+
// CHECK: function_ref {{.*}}, loc "{{.*}}":[[@LINE-4]]:10
217217

218218
// CHECK-LABEL: sil private [ossa] @$s13sil_locations14captures_tuple{{.*}}fU_
219219
// CHECK: copy_addr {{.*}}, loc "{{.*}}":[[@LINE-7]]:11

test/SILOptimizer/capturepromotion-wrong-lexicalscope.swift

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)