Add an assertion check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-11-12 20:30:32 +00:00
parent b7325433aa
commit 27afeb2be8

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)