From 5b9974a81f51ff9ba32e0d0ef462246e838770ae Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Mon, 9 Feb 2009 20:27:45 +0000 Subject: [PATCH] incorporate review feedback llvm-svn: 64158 --- llvm/include/llvm/Instructions.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h index 9503d8a54377..73e4f85b38c3 100644 --- a/llvm/include/llvm/Instructions.h +++ b/llvm/include/llvm/Instructions.h @@ -2188,9 +2188,7 @@ public: BasicBlock *getSuccessor(unsigned i) const { assert(i < getNumSuccessors() && "Successor # out of range for Branch!"); - if (Value *V = getOperand(i)) - return cast(V); - return 0; + return cast_or_null(getOperand(i)); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) {