use range-based for-loop
authorSanjay Patel <spatel@rotateright.com>
Thu, 21 May 2015 17:04:17 +0000 (17:04 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 21 May 2015 17:04:17 +0000 (17:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237914 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ScheduleDAGInstrs.cpp

index 9aed27f20aa8d3e293e8f69b019e536e5b82838a..c60c5183b42920bf25adb62d76fa7de6b61ce78e 100644 (file)
@@ -499,10 +499,9 @@ static inline bool isUnsafeMemoryObject(MachineInstr *MI,
 
   SmallVector<Value *, 4> Objs;
   getUnderlyingObjects(V, Objs, DL);
-  for (SmallVectorImpl<Value *>::iterator I = Objs.begin(),
-         IE = Objs.end(); I != IE; ++I) {
+  for (Value *V : Objs) {
     // Does this pointer refer to a distinct and identifiable object?
-    if (!isIdentifiedObject(*I))
+    if (!isIdentifiedObject(V))
       return true;
   }