Add an assertion check

llvm-svn: 1276
This commit is contained in:
Chris Lattner 2001-11-12 20:30:32 +00:00
parent 4a797f461f
commit f0cd13bc28
1 changed files with 2 additions and 0 deletions

View File

@ -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)