diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-12 20:30:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-12 20:30:32 +0000 |
commit | f0cd13bc284e13b9bcb7276107efe2b8df6d0b8a (patch) | |
tree | 0bd758bc6fc7bd79001fecbb9e540c2af9b2158c /llvm/lib/Bytecode | |
parent | 4a797f461f64f914f23fac2151016eae96cf7309 (diff) | |
download | bcm5719-llvm-f0cd13bc284e13b9bcb7276107efe2b8df6d0b8a.tar.gz bcm5719-llvm-f0cd13bc284e13b9bcb7276107efe2b8df6d0b8a.zip |
Add an assertion check
llvm-svn: 1276
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Reader/InstructionReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp index fc4f73c7840..6587ab21458 100644 --- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp +++ b/llvm/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) |