From: Chris Lattner Date: Thu, 29 Oct 2009 05:53:32 +0000 (+0000) Subject: add sanity check for indbr. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a4c206febea2cd77571bd04f97353ff4e027e6e2;p=oota-llvm.git add sanity check for indbr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85496 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 1e63436883c..52d8735d89b 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -3091,7 +3091,8 @@ void SwitchInst::setSuccessorV(unsigned idx, BasicBlock *B) { //===----------------------------------------------------------------------===// void IndirectBrInst::init(Value *Address, unsigned NumDests) { - assert(Address); + assert(Address && isa(Address->getType()) && + "Address of indirectbr must be a pointer"); ReservedSpace = 1+NumDests; NumOperands = 1; OperandList = allocHungoffUses(ReservedSpace);