From: Pete Cooper Date: Wed, 15 Jul 2015 01:31:20 +0000 (+0000) Subject: Use another foreach loop. NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=483db5542fd88853602cf34af0793dd76f50780b;p=oota-llvm.git Use another foreach loop. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242263 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 44ce0cf0ca2..7d1e1f86913 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -586,8 +586,7 @@ RegsForValue::RegsForValue(LLVMContext &Context, const TargetLowering &TLI, const DataLayout &DL, unsigned Reg, Type *Ty) { ComputeValueVTs(TLI, DL, Ty, ValueVTs); - for (unsigned Value = 0, e = ValueVTs.size(); Value != e; ++Value) { - EVT ValueVT = ValueVTs[Value]; + for (EVT ValueVT : ValueVTs) { unsigned NumRegs = TLI.getNumRegisters(Context, ValueVT); MVT RegisterVT = TLI.getRegisterType(Context, ValueVT); for (unsigned i = 0; i != NumRegs; ++i)