diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-06-08 22:03:05 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-06-08 22:03:05 +0000 |
| commit | 8b52a68356c3128aa8640ed27b47026dc5e9b07b (patch) | |
| tree | 264a96948a23fa2fffbfdcc49e1b82b7c380a320 | |
| parent | 4c7a24af44068e615b3c4d5a45e2ad9d76229ecc (diff) | |
| download | bcm5719-llvm-8b52a68356c3128aa8640ed27b47026dc5e9b07b.tar.gz bcm5719-llvm-8b52a68356c3128aa8640ed27b47026dc5e9b07b.zip | |
I checked and no clients expect this to return null for unconditional branches
Simplify code and make it more uniform.
llvm-svn: 14077
| -rw-r--r-- | llvm/include/llvm/iTerminators.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/iTerminators.h b/llvm/include/llvm/iTerminators.h index 7a10467e062..ddced52697e 100644 --- a/llvm/include/llvm/iTerminators.h +++ b/llvm/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) { |

