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:
parent
2dce653a78
commit
3dc54c19b3
@ -376,6 +376,8 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
|
|||||||
delete Raw.VarArgs;
|
delete Raw.VarArgs;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
assert(LoadInst::getIndexedType(Raw.Ty, Idx) &&
|
||||||
|
"Bad indices for GEP or Load!");
|
||||||
if (Raw.Opcode == Instruction::Load)
|
if (Raw.Opcode == Instruction::Load)
|
||||||
Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), Idx);
|
Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), Idx);
|
||||||
else if (Raw.Opcode == Instruction::GetElementPtr)
|
else if (Raw.Opcode == Instruction::GetElementPtr)
|
||||||
|
Loading…
Reference in New Issue
Block a user