projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3d5a65
)
add sanity check for indbr.
author
Chris Lattner
<sabre@nondot.org>
Thu, 29 Oct 2009 05:53:32 +0000
(
05:53
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 29 Oct 2009 05:53:32 +0000
(
05:53
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85496
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Instructions.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Instructions.cpp
b/lib/VMCore/Instructions.cpp
index 1e63436883c896d12319c7833456c82c5fbbd78a..52d8735d89b7ab34b45d3ca3e84ffd5f603023cf 100644
(file)
--- 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);