diff options
author | Sanjay Patel <spatel@rotateright.com> | 2015-11-13 16:21:23 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2015-11-13 16:21:23 +0000 |
commit | 225d65f1e66d865076f57b31152357b4ad0e383f (patch) | |
tree | eb71102e32d76f20f23e571ca2072dec3b955805 /llvm/lib/Bitcode | |
parent | b564098c62e1e40b2514eb717718ffd0eb1bad0b (diff) | |
download | bcm5719-llvm-225d65f1e66d865076f57b31152357b4ad0e383f.tar.gz bcm5719-llvm-225d65f1e66d865076f57b31152357b4ad0e383f.zip |
use range-based for loop; NFCI
llvm-svn: 253048
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 845bbfb8d36..62a99c7014b 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1891,10 +1891,9 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, 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; |