forked from OSchip/llvm-project
[CodeGen] RegisterCoalescer::buildVRegToDbgValueMap - use const-ref value in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
This commit is contained in:
parent
85a586501b
commit
5cabe4d9d3
|
@ -3708,7 +3708,7 @@ void RegisterCoalescer::buildVRegToDbgValueMap(MachineFunction &MF)
|
|||
// vreg => DbgValueLoc map.
|
||||
auto CloseNewDVRange = [this, &ToInsert](SlotIndex Slot) {
|
||||
for (auto *X : ToInsert) {
|
||||
for (auto Op : X->debug_operands()) {
|
||||
for (const auto &Op : X->debug_operands()) {
|
||||
if (Op.isReg() && Op.getReg().isVirtual())
|
||||
DbgVRegToValues[Op.getReg()].push_back({Slot, X});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue