File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 23
23
using namespace swift ;
24
24
25
25
SILDebugScope::SILDebugScope (SILLocation Loc, SILFunction *SILFn,
26
- const SILDebugScope *ParentScope ,
26
+ const SILDebugScope *ParentScope,
27
27
const SILDebugScope *InlinedCallSite)
28
28
: Loc(Loc), InlinedCallSite(InlinedCallSite) {
29
29
if (ParentScope)
Original file line number Diff line number Diff line change @@ -435,9 +435,10 @@ SILInliner::getOrCreateInlineScope(const SILDebugScope *CalleeScope) {
435
435
auto &M = getBuilder ().getFunction ().getModule ();
436
436
auto InlinedAt =
437
437
getOrCreateInlineScope (CalleeScope->InlinedCallSite );
438
+ auto ParentScope = CalleeScope->Parent .dyn_cast <const SILDebugScope *>();
438
439
auto *InlinedScope = new (M) SILDebugScope (
439
440
CalleeScope->Loc , CalleeScope->Parent .dyn_cast <SILFunction *>(),
440
- CalleeScope-> Parent . dyn_cast < const SILDebugScope *>() , InlinedAt);
441
+ ParentScope ? getOrCreateInlineScope (ParentScope) : nullptr , InlinedAt);
441
442
InlinedScopeCache.insert ({CalleeScope, InlinedScope});
442
443
return InlinedScope;
443
444
}
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ func yes() -> Bool { return true }
24
24
// SIL: sil_scope [[F1G:.*]] { loc "f.swift":5:5 parent [[F1]] }
25
25
// SIL: sil_scope [[F1G1:.*]] { loc "g.swift":2:3 {{.*}}inlined_at [[F1G]] }
26
26
// SIL: sil_scope [[F1G3:.*]] { loc "g.swift":3:5 {{.*}}inlined_at [[F1G]] }
27
- // SIL: sil_scope [[F1G3H2:.*]] { loc "h.swift":3:3{{.*}} inlined_at 12 }
27
+ // SIL: sil_scope [[F1G3H:.*]] { loc "h.swift":1:24
28
+ // SIL-SAME: parent @{{.*}}1h{{.*}} inlined_at [[F1G3]] }
29
+ // SIL: sil_scope [[F1G3H1:.*]] { loc "h.swift":1:37
30
+ // SIL-SAME: parent [[F1G3H]] inlined_at [[F1G3]] }
31
+ // SIL: sil_scope [[F1G3H2:.*]] { loc "h.swift":3:3
32
+ // SIL-SAME: parent [[F1G3H1]] inlined_at [[F1G3]] }
28
33
// SIL: sil_scope [[F1G3H2_THUNK:.*]] { loc "use.swift":1:21
29
34
// SIL-SAME: inlined_at [[F1G3H2]] }
30
35
You can’t perform that action at this time.
0 commit comments