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 | c1bb13f1b8794aa6f3219b3ac567f569ad78a6d1 (patch) | |
tree | 21568d93e066ec6bc024415a6a8d06600f5461c1 /lib/Transforms/Utils/Local.cpp | |
parent | dd9db6688283639a0c95f8ed67beb1bd54b5fff4 (diff) |
use precise getters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index b8077aefb1..c22485342e 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/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? |