[C++11] Add range based accessors for the Use-Def chain of a Value.
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineWorklist.h
index f84db2730b431e991c5d0aa9216aeb881aec2cd3..8c780b50ca7c8abb51526bdfe3f17bfd6af94e29 100644 (file)
@@ -84,9 +84,8 @@ public:
   /// now.
   ///
   void AddUsersToWorkList(Instruction &I) {
-    for (Value::use_iterator UI = I.use_begin(), UE = I.use_end();
-         UI != UE; ++UI)
-      Add(cast<Instruction>(*UI));
+    for (User *U : I.users())
+      Add(cast<Instruction>(U));
   }