1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Add an assertion check

llvm-svn: 1276
This commit is contained in:
Chris Lattner 2001-11-12 20:30:32 +00:00
parent 2dce653a78
commit 3dc54c19b3

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)