use range-based for loop; NFC
authorSanjay Patel <spatel@rotateright.com>
Sun, 31 Jan 2016 16:34:48 +0000 (16:34 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 31 Jan 2016 16:34:48 +0000 (16:34 +0000)
llvm-svn: 259325

llvm/lib/Transforms/InstCombine/InstCombineInternal.h

index e4e5065..f23cc8a 100644 (file)
@@ -458,9 +458,9 @@ public:
     // Make sure that we reprocess all operands now that we reduced their
     // use counts.
     if (I.getNumOperands() < 8) {
-      for (User::op_iterator i = I.op_begin(), e = I.op_end(); i != e; ++i)
-        if (Instruction *Op = dyn_cast<Instruction>(*i))
-          Worklist.Add(Op);
+      for (Use &Operand : I.operands())
+        if (auto *Inst = dyn_cast<Instruction>(Operand))
+          Worklist.Add(Inst);
     }
     Worklist.Remove(&I);
     I.eraseFromParent();