Skip to content

Commit 35e0cd5

Browse files
committed
Set debugging scope properly when we generate field extractions
1 parent a415ade commit 35e0cd5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/SIL/SILValueProjection.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ SILValue SILValueProjection::createExtract(SILValue Base,
4949
// from our list of address projections.
5050
SILValue LastExtract = Base;
5151
SILBuilder Builder(Inst);
52+
Builder.setCurrentDebugScope(Inst->getFunction()->getDebugScope());
5253

5354
// We use an auto-generated SILLocation for now.
5455
// TODO: make the sil location more precise.
@@ -165,6 +166,7 @@ SILValue LSValue::reduce(LSLocation &Base, SILModule *M,
165166
Vals.push_back(Values[X].materialize(InsertPt));
166167
}
167168
SILBuilder Builder(InsertPt);
169+
Builder.setCurrentDebugScope(InsertPt->getFunction()->getDebugScope());
168170

169171
// We use an auto-generated SILLocation for now.
170172
// TODO: make the sil location more precise.

0 commit comments

Comments
 (0)