We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0ccd97 commit 91aa53fCopy full SHA for 91aa53f
lib/SILOptimizer/Mandatory/CapturePromotion.cpp
@@ -585,7 +585,10 @@ void ClosureCloner::visitDebugValueInst(DebugValueInst *inst) {
585
if (inst->hasAddrVal())
586
if (SILValue value = getProjectBoxMappedVal(inst->getOperand())) {
587
getBuilder().setCurrentDebugScope(getOpScope(inst->getDebugScope()));
588
- getBuilder().createDebugValue(inst->getLoc(), value, *inst->getVarInfo());
+ auto varInfo = *inst->getVarInfo();
589
+ if (varInfo.Scope)
590
+ varInfo.Scope = getOpScope(inst->getDebugScope());
591
+ getBuilder().createDebugValue(inst->getLoc(), value, varInfo);
592
return;
593
}
594
SILCloner<ClosureCloner>::visitDebugValueInst(inst);
0 commit comments