use range-based for-loop

llvm-svn: 237914
This commit is contained in:
Sanjay Patel 2015-05-21 17:04:17 +00:00
parent e2fdf8d60e
commit f8c028c0b0
1 changed files with 2 additions and 3 deletions

View 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;
}