From: Chris Lattner Date: Tue, 8 Jun 2004 22:03:05 +0000 (+0000) Subject: I checked and no clients expect this to return null for unconditional branches X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=97baedc8c5b9e24f90a3bde98ec2c05e1713e5ed;p=oota-llvm.git 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 --- diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index 7a10467e062..ddced52697e 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(Operands[2].get()); + assert(isConditional() && "Cannot get condition of an uncond branch!"); + return Operands[2].get(); } void setCondition(Value *V) {