diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-01-30 18:21:13 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-01-30 18:21:13 +0000 |
commit | 97f1720621b4d456a67a467f1df2c59a254a40f5 (patch) | |
tree | 4e290442ae378dab5c888bca5278ae28925fe881 /llvm | |
parent | c094970cd215bf469b0f12b38c95208f3c2ee3f8 (diff) | |
download | bcm5719-llvm-97f1720621b4d456a67a467f1df2c59a254a40f5.tar.gz bcm5719-llvm-97f1720621b4d456a67a467f1df2c59a254a40f5.zip |
use precise getters
llvm-svn: 63402
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index b8077aefb13..c22485342e0 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -38,8 +38,8 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB) { // Branch - See if we are conditional jumping on constant if (BranchInst *BI = dyn_cast<BranchInst>(T)) { if (BI->isUnconditional()) return false; // Can't optimize uncond branch - BasicBlock *Dest1 = cast<BasicBlock>(BI->getOperand(0)); - BasicBlock *Dest2 = cast<BasicBlock>(BI->getOperand(1)); + BasicBlock *Dest1 = BI->getSuccessor(0); + BasicBlock *Dest2 = BI->getSuccessor(1); if (ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition())) { // Are we branching on constant? |