Change range-based for-loops to be -Wrange-loop-analysis clean.
[oota-llvm.git] / lib / Target / AArch64 / AArch64CollectLOH.cpp
index 568f258c550a3e661dadf9cc35d8fa40b102f5d0..efdb2e33a36eaf74d2e0650f9cec08a349460405 100644 (file)
@@ -328,7 +328,7 @@ static void initReachingDef(const MachineFunction &MF,
         const uint32_t *PreservedRegs = MO.getRegMask();
 
         // Set generated regs.
-        for (const auto Entry : RegToId) {
+        for (const auto &Entry : RegToId) {
           unsigned Reg = Entry.second;
           // Use the global register ID when querying APIs external to this
           // pass.