aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 146d1f5..dc29b9a 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1323,8 +1323,7 @@ public:
BasicBlock *getSuccessor(unsigned i) const {
assert(i < getNumSuccessors() && "Successor # out of range for Branch!");
- return (i == 0) ? cast<BasicBlock>(getOperand(0)) :
- cast<BasicBlock>(getOperand(1));
+ return cast<BasicBlock>(getOperand(i));
}
void setSuccessor(unsigned idx, BasicBlock *NewSucc) {