mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 23:50:50 +00:00
Fix bug in new assertion
llvm-svn: 1279
This commit is contained in:
parent
3484bbb97c
commit
a6ada3716c
@ -376,14 +376,17 @@ 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)
|
||||
|
||||
if (Raw.Opcode == Instruction::Load) {
|
||||
assert(MemAccessInst::getIndexedType(Raw.Ty, Idx) &&
|
||||
"Bad indices for GEP or Load!");
|
||||
Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), Idx);
|
||||
else if (Raw.Opcode == Instruction::GetElementPtr)
|
||||
} else if (Raw.Opcode == Instruction::GetElementPtr)
|
||||
Res = new GetElementPtrInst(getValue(Raw.Ty, Raw.Arg1), Idx);
|
||||
else
|
||||
abort();
|
||||
if (!MemAccessInst::getIndexedType(Raw.Ty, Idx))
|
||||
cerr << Res;
|
||||
return false;
|
||||
}
|
||||
case Instruction::Store: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user