File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -1540,18 +1540,19 @@ uint16_t SILGenFunction::emitBasicProlog(
1540
1540
B.createDebugValue (loc, undef.getValue (), dbgVar);
1541
1541
}
1542
1542
1543
- for (auto &i : *B.getInsertionBB ()) {
1544
- auto *alloc = dyn_cast<AllocStackInst>(&i);
1545
- if (!alloc)
1546
- continue ;
1547
- auto varInfo = alloc->getVarInfo ();
1548
- if (!varInfo || varInfo->ArgNo )
1549
- continue ;
1550
- // The allocation has a varinfo but no argument number, which should not
1551
- // happen in the prolog. Unfortunately, some copies can generate wrong
1552
- // debug info, so we have to fix it here, by invalidating it.
1553
- alloc->invalidateVarInfo ();
1554
- }
1543
+ for (auto &bb : B.getFunction ())
1544
+ for (auto &i : bb) {
1545
+ auto *alloc = dyn_cast<AllocStackInst>(&i);
1546
+ if (!alloc)
1547
+ continue ;
1548
+ auto varInfo = alloc->getVarInfo ();
1549
+ if (!varInfo || varInfo->ArgNo )
1550
+ continue ;
1551
+ // The allocation has a varinfo but no argument number, which should not
1552
+ // happen in the prolog. Unfortunately, some copies can generate wrong
1553
+ // debug info, so we have to fix it here, by invalidating it.
1554
+ alloc->invalidateVarInfo ();
1555
+ }
1555
1556
1556
1557
return ArgNo;
1557
1558
}
You can’t perform that action at this time.
0 commit comments