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 | a4c206febea2cd77571bd04f97353ff4e027e6e2 (patch) | |
| tree | 2b214b54fb73c234a4f4a319e516350256b61415 /lib/VMCore | |
| parent | b3d5a65d94ca017570fe86578423186c6a2f642e (diff) | |
| download | external_llvm-a4c206febea2cd77571bd04f97353ff4e027e6e2.zip external_llvm-a4c206febea2cd77571bd04f97353ff4e027e6e2.tar.gz external_llvm-a4c206febea2cd77571bd04f97353ff4e027e6e2.tar.bz2 | |
add sanity check for indbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/Instructions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 1e63436..52d8735 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<PointerType>(Address->getType()) && + "Address of indirectbr must be a pointer"); ReservedSpace = 1+NumDests; NumOperands = 1; OperandList = allocHungoffUses(ReservedSpace); |
