[llvm-commits] [llvm] r64158 - /llvm/trunk/include/llvm/Instructions.h

Gabor Greif ggreif at gmail.com
Mon Feb 9 12:27:45 PST 2009


Author: ggreif
Date: Mon Feb  9 14:27:45 2009
New Revision: 64158

URL: http://llvm.org/viewvc/llvm-project?rev=64158&view=rev
Log:
incorporate review feedback

Modified:
    llvm/trunk/include/llvm/Instructions.h

Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=64158&r1=64157&r2=64158&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Mon Feb  9 14:27:45 2009
@@ -2188,9 +2188,7 @@
 
   BasicBlock *getSuccessor(unsigned i) const {
     assert(i < getNumSuccessors() && "Successor # out of range for Branch!");
-    if (Value *V = getOperand(i))
-      return cast<BasicBlock>(V);
-    return 0;
+    return cast_or_null<BasicBlock>(getOperand(i));
   }
 
   void setSuccessor(unsigned idx, BasicBlock *NewSucc) {





More information about the llvm-commits mailing list