projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c767844
)
Simplify BranchInst::getSuccessor, avoiding a conditional operator.
author
Dan Gohman
<gohman@apple.com>
Fri, 11 May 2007 20:59:29 +0000
(20:59 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 11 May 2007 20:59:29 +0000
(20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36991
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Instructions.h
patch
|
blob
|
history
diff --git
a/include/llvm/Instructions.h
b/include/llvm/Instructions.h
index 146d1f50a645d0aede3f2ff7e934766f01a0e15a..dc29b9a8f8cdc6f89e8c015d586b37374a14740a 100644
(file)
--- 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) {