[llvm] r253048 - use range-based for loop; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 08:21:23 PST 2015
Author: spatel
Date: Fri Nov 13 10:21:23 2015
New Revision: 253048
URL: http://llvm.org/viewvc/llvm-project?rev=253048&view=rev
Log:
use range-based for loop; NFCI
Modified:
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=253048&r1=253047&r2=253048&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Fri Nov 13 10:21:23 2015
@@ -1891,10 +1891,9 @@ static void WriteInstruction(const Instr
Vals.push_back(VE.getTypeID(SI.getCondition()->getType()));
pushValue(SI.getCondition(), InstID, Vals, VE);
Vals.push_back(VE.getValueID(SI.getDefaultDest()));
- for (SwitchInst::ConstCaseIt i = SI.case_begin(), e = SI.case_end();
- i != e; ++i) {
- Vals.push_back(VE.getValueID(i.getCaseValue()));
- Vals.push_back(VE.getValueID(i.getCaseSuccessor()));
+ for (SwitchInst::ConstCaseIt Case : SI.cases()) {
+ Vals.push_back(VE.getValueID(Case.getCaseValue()));
+ Vals.push_back(VE.getValueID(Case.getCaseSuccessor()));
}
}
break;
More information about the llvm-commits
mailing list