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
This commit is contained in:
Chris Lattner 2004-06-08 22:03:05 +00:00
parent 47c31a8248
commit 97baedc8c5

View File

@ -126,7 +126,8 @@ public:
inline bool isConditional() const { return Operands.size() == 3; } inline bool isConditional() const { return Operands.size() == 3; }
inline Value *getCondition() const { 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) { void setCondition(Value *V) {