aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2012-03-24 04:18:09 -0700
committerShih-wei Liao <sliao@google.com>2012-03-24 04:18:09 -0700
commitc59a7995d22e2889706810c90a20a51ecfec278b (patch)
treeef37472f01d4b6258755680b4561a667bc337dd6 /lib/Bitcode/Writer
parentd1acd051dd8446a013b6c35b4bfe64ec68417206 (diff)
parent98a92d199ce9993dca1b65927009013ad3e5297f (diff)
downloadexternal_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.zip
external_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.tar.gz
external_llvm-c59a7995d22e2889706810c90a20a51ecfec278b.tar.bz2
Merge branch 'upstream' into sliao_d
Diffstat (limited to 'lib/Bitcode/Writer')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 9376990..b25d2e9 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1142,9 +1142,10 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
Vals.push_back(VE.getTypeID(SI.getCondition()->getType()));
Vals.push_back(VE.getValueID(SI.getCondition()));
Vals.push_back(VE.getValueID(SI.getDefaultDest()));
- for (unsigned i = 0, e = SI.getNumCases(); i != e; ++i) {
- Vals.push_back(VE.getValueID(SI.getCaseValue(i)));
- Vals.push_back(VE.getValueID(SI.getCaseSuccessor(i)));
+ for (SwitchInst::CaseIt 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()));
}
}
break;