diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-29 05:53:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-29 05:53:32 +0000 |
commit | 6747b4ca3084a976ba50c71d738886a067a0a27c (patch) | |
tree | d1a61bcadd66415a87491de36b11154f2fc32e28 /llvm/lib | |
parent | 312748848ff9069641c31e5cdaad1c0167fdcbe3 (diff) | |
download | bcm5719-llvm-6747b4ca3084a976ba50c71d738886a067a0a27c.tar.gz bcm5719-llvm-6747b4ca3084a976ba50c71d738886a067a0a27c.zip |
add sanity check for indbr.
llvm-svn: 85496
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 1e63436883c..52d8735d89b 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/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<PointerType>(Address->getType()) && + "Address of indirectbr must be a pointer"); ReservedSpace = 1+NumDests; NumOperands = 1; OperandList = allocHungoffUses(ReservedSpace); |