File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 42
42
namespace swift {
43
43
44
44
class SILInstruction ;
45
-
46
- // / Deletes all of the debug instructions that use \p Inst.
47
- inline void deleteAllDebugUses (ValueBase *Inst) {
48
- for (auto UI = Inst->use_begin (), E = Inst->use_end (); UI != E;) {
49
- auto *Inst = UI->getUser ();
50
- UI++;
51
- if (Inst->isDebugInstruction ())
52
- Inst->eraseFromParent ();
45
+
46
+ // / Deletes all of the debug instructions that use \p value.
47
+ inline void deleteAllDebugUses (SILValue value) {
48
+ for (auto ui = value->use_begin (), ue = value->use_end (); ui != ue;) {
49
+ auto *inst = ui->getUser ();
50
+ ++ui;
51
+ if (inst->isDebugInstruction ()) {
52
+ inst->eraseFromParent ();
53
+ }
54
+ }
55
+ }
56
+
57
+ // / Deletes all of the debug uses of any result of \p inst.
58
+ inline void deleteAllDebugUses (SILInstruction *inst) {
59
+ for (SILValue v : inst->getResults ()) {
60
+ deleteAllDebugUses (v);
53
61
}
54
62
}
55
63
You can’t perform that action at this time.
0 commit comments