diff options
| author | Gabor Greif <ggreif@gmail.com> | 2009-01-30 18:27:21 +0000 | 
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2009-01-30 18:27:21 +0000 | 
| commit | 1933b00c12a1165e677ef1eb562a36550b198379 (patch) | |
| tree | 242c0c622678de54537a7feffc0be8cb3a264827 /llvm/lib | |
| parent | 97f1720621b4d456a67a467f1df2c59a254a40f5 (diff) | |
| download | bcm5719-llvm-1933b00c12a1165e677ef1eb562a36550b198379.tar.gz bcm5719-llvm-1933b00c12a1165e677ef1eb562a36550b198379.zip  | |
use precise getters
llvm-svn: 63403
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 0cb476e3051..e37c439f5ce 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -811,11 +811,14 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,      }      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:  | 

