// source order number as N.
MachineBasicBlock *BB = Emitter.getBlock();
MachineBasicBlock::iterator InsertPos = Emitter.getInsertPos();
- ArrayRef<SDDbgValue*> DVs = DAG->GetDbgValues(N);
- for (unsigned i = 0, e = DVs.size(); i != e; ++i) {
- if (DVs[i]->isInvalidated())
+ for (auto DV : DAG->GetDbgValues(N)) {
+ if (DV->isInvalidated())
continue;
- unsigned DVOrder = DVs[i]->getOrder();
+ unsigned DVOrder = DV->getOrder();
if (!Order || DVOrder == Order) {
- MachineInstr *DbgMI = Emitter.EmitDbgValue(DVs[i], VRBaseMap);
+ MachineInstr *DbgMI = Emitter.EmitDbgValue(DV, VRBaseMap);
if (DbgMI) {
Orders.push_back({DVOrder, DbgMI});
BB->insert(InsertPos, DbgMI);
}
- DVs[i]->setIsInvalidated();
+ DV->setIsInvalidated();
}
}
}