aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
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);