From 8af7fbc34c02f974458b046b664c8b8a180dd45d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sun, 31 Jan 2016 16:34:48 +0000 Subject: [PATCH] use range-based for loop; NFC llvm-svn: 259325 --- llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index e4e5065..f23cc8a 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -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(*i)) - Worklist.Add(Op); + for (Use &Operand : I.operands()) + if (auto *Inst = dyn_cast(Operand)) + Worklist.Add(Inst); } Worklist.Remove(&I); I.eraseFromParent(); -- 2.7.4