[llvm-commits] [llvm] r63403 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Gabor Greif
ggreif at gmail.com
Fri Jan 30 10:27:22 PST 2009
Author: ggreif
Date: Fri Jan 30 12:27:21 2009
New Revision: 63403
URL: http://llvm.org/viewvc/llvm-project?rev=63403&view=rev
Log:
use precise getters
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=63403&r1=63402&r2=63403&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Fri Jan 30 12:27:21 2009
@@ -811,11 +811,14 @@
}
break;
case Instruction::Br:
- Code = bitc::FUNC_CODE_INST_BR;
- Vals.push_back(VE.getValueID(I.getOperand(0)));
- if (cast<BranchInst>(I).isConditional()) {
- Vals.push_back(VE.getValueID(I.getOperand(1)));
- Vals.push_back(VE.getValueID(I.getOperand(2)));
+ {
+ Code = bitc::FUNC_CODE_INST_BR;
+ BranchInst &II(cast<BranchInst>(I));
+ Vals.push_back(VE.getValueID(II.getSuccessor(0)));
+ if (II.isConditional()) {
+ Vals.push_back(VE.getValueID(II.getSuccessor(1)));
+ Vals.push_back(VE.getValueID(II.getCondition()));
+ }
}
break;
case Instruction::Switch:
More information about the llvm-commits
mailing list