make sure that BranchInst::getSuccessor() does not assert in cast<>
authorGabor Greif <ggreif@gmail.com>
Mon, 9 Feb 2009 15:45:06 +0000 (15:45 +0000)
committerGabor Greif <ggreif@gmail.com>
Mon, 9 Feb 2009 15:45:06 +0000 (15:45 +0000)
commitccd27fb84b0ac13ad1d30b17cbeb87a0ea934154
treeddb8cf871cdd2e5ff04974a0cbccbfb43578e81e
parentfb3e5ca53b412a41d26bb4316f10e68aa72f65f6
make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64142 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Instructions.h
lib/VMCore/AsmWriter.cpp