From 8dc7b982b4556c243e0502e6e230bdd53ddd65ff Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 1 Jan 2020 17:23:21 +0100 Subject: [NFC] Fixes -Wrange-loop-analysis warnings This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71857 --- llvm/lib/CodeGen/RegAllocFast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp') diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index 237ed0ebc36..89b5bcebd61 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -1253,7 +1253,7 @@ void RegAllocFast::allocateBasicBlock(MachineBasicBlock &MBB) { MachineBasicBlock::iterator MII = MBB.begin(); // Add live-in registers as live. - for (const MachineBasicBlock::RegisterMaskPair LI : MBB.liveins()) + for (const MachineBasicBlock::RegisterMaskPair &LI : MBB.liveins()) if (MRI->isAllocatable(LI.PhysReg)) definePhysReg(MII, LI.PhysReg, regReserved); -- cgit v1.2.3