aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-29 05:53:32 +0000
committerChris Lattner <sabre@nondot.org>2009-10-29 05:53:32 +0000
commit6c633c5a850ed50e123bd975990e59d0e60d4614 (patch)
tree2b214b54fb73c234a4f4a319e516350256b61415 /lib/VMCore
parent4f2bbd66a9e049f60c8187a201f18d0df80c2e12 (diff)
downloadexternal_llvm-6c633c5a850ed50e123bd975990e59d0e60d4614.zip
external_llvm-6c633c5a850ed50e123bd975990e59d0e60d4614.tar.gz
external_llvm-6c633c5a850ed50e123bd975990e59d0e60d4614.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.cpp3
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);