aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-08 22:03:05 +0000
committerChris Lattner <sabre@nondot.org>2004-06-08 22:03:05 +0000
commit97baedc8c5b9e24f90a3bde98ec2c05e1713e5ed (patch)
tree1818b4ca262648a72d8326be38d274f70eb7e431
parent47c31a824803b6fffcf9818dccbbe040c366c5ab (diff)
I checked and no clients expect this to return null for unconditional branches
Simplify code and make it more uniform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14077 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/iTerminators.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h
index 7a10467e06..ddced52697 100644
--- a/include/llvm/iTerminators.h
+++ b/include/llvm/iTerminators.h
@@ -126,7 +126,8 @@ public:
inline bool isConditional() const { return Operands.size() == 3; }
inline Value *getCondition() const {
- return isUnconditional() ? 0 : reinterpret_cast<Value*>(Operands[2].get());
+ assert(isConditional() && "Cannot get condition of an uncond branch!");
+ return Operands[2].get();
}
void setCondition(Value *V) {