From 732985157f7115003fdeb3ea9b2d10efb30c93c6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 24 Feb 2017 06:38:24 +0000 Subject: [PATCH] [ExecutionDepsFix] Use range-based for loop. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296093 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ExecutionDepsFix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/CodeGen/ExecutionDepsFix.cpp b/lib/CodeGen/ExecutionDepsFix.cpp index 2da791ca783..4a310f70769 100644 --- a/lib/CodeGen/ExecutionDepsFix.cpp +++ b/lib/CodeGen/ExecutionDepsFix.cpp @@ -722,8 +722,7 @@ void ExeDepsFix::visitSoftInstr(MachineInstr *mi, unsigned mask) { // Kill off any remaining uses that don't match available, and build a list of // incoming DomainValues that we want to merge. SmallVector Regs; - for (SmallVectorImpl::iterator i=used.begin(), e=used.end(); i!=e; ++i) { - int rx = *i; + for (int rx : used) { assert(LiveRegs && "no space allocated for live registers"); const LiveReg &LR = LiveRegs[rx]; // This useless DomainValue could have been missed above. -- 2.50.1