diff options
author | Dan Gohman <gohman@apple.com> | 2007-05-11 20:59:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-05-11 20:59:29 +0000 |
commit | b96039e4b9f167b7ad9196411c14bacbffb3991b (patch) | |
tree | da97cc52c7b0957cd9f6421fb88ed554a5954bb3 | |
parent | c767844fc9238d504f2fad3a335163ce040fefc4 (diff) |
Simplify BranchInst::getSuccessor, avoiding a conditional operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36991 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Instructions.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 146d1f50a6..dc29b9a8f8 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) { |