mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Improved handling of mGhostDependencies. Codegen Abort
This commit is contained in:
parent
9988dec99d
commit
a82cc0534d
6 changed files with 37 additions and 4 deletions
|
@ -1123,7 +1123,10 @@ void BeIRCodeGen::Read(BeMDNode*& llvmMD)
|
|||
}
|
||||
|
||||
void BeIRCodeGen::HandleNextCmd()
|
||||
{
|
||||
{
|
||||
if (mFailed)
|
||||
return;
|
||||
|
||||
int curId = mCmdCount;
|
||||
|
||||
BfIRCmd cmd = (BfIRCmd)mStream->Read();
|
||||
|
@ -1192,6 +1195,11 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
mBeModule->print(outStream, NULL);*/
|
||||
}
|
||||
break;
|
||||
case BfIRCmd_Abort:
|
||||
{
|
||||
Fail("Stream aborted");
|
||||
}
|
||||
break;
|
||||
case BfIRCmd_SetType:
|
||||
{
|
||||
CMD_PARAM(int, typeId);
|
||||
|
@ -1236,6 +1244,13 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(int, instSize);
|
||||
CMD_PARAM(int, instAlign);
|
||||
CMD_PARAM(bool, isPacked);
|
||||
|
||||
if ((type == NULL) || (type->mTypeCode != BeTypeCode_Struct))
|
||||
{
|
||||
Fail("StructSetBody invalid type");
|
||||
break;
|
||||
}
|
||||
|
||||
BF_ASSERT(type->mTypeCode == BeTypeCode_Struct);
|
||||
auto structType = (BeStructType*)type;
|
||||
mBeContext->SetStructBody(structType, members, isPacked);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue