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:
b732543
)
Add an assertion check
author
Chris Lattner
<sabre@nondot.org>
Mon, 12 Nov 2001 20:30:32 +0000
(20:30 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 12 Nov 2001 20:30:32 +0000
(20:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1276
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Bytecode/Reader/InstructionReader.cpp
patch
|
blob
|
history
diff --git
a/lib/Bytecode/Reader/InstructionReader.cpp
b/lib/Bytecode/Reader/InstructionReader.cpp
index fc4f73c7840a0f87de9f311d9f757e998716997a..6587ab214581f5d133ef293fd322fca18c1c4280 100644
(file)
--- a/
lib/Bytecode/Reader/InstructionReader.cpp
+++ b/
lib/Bytecode/Reader/InstructionReader.cpp
@@
-376,6
+376,8
@@
bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
delete Raw.VarArgs;
break;
}
+ assert(LoadInst::getIndexedType(Raw.Ty, Idx) &&
+ "Bad indices for GEP or Load!");
if (Raw.Opcode == Instruction::Load)
Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), Idx);
else if (Raw.Opcode == Instruction::GetElementPtr)