mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Const resolve enum case cast fix
This commit is contained in:
parent
f830e23c52
commit
53f4e8955e
4 changed files with 17 additions and 2 deletions
|
@ -1135,7 +1135,10 @@ void BeIRCodeGen::Read(BeMDNode*& llvmMD)
|
|||
void BeIRCodeGen::HandleNextCmd()
|
||||
{
|
||||
if (mFailed)
|
||||
{
|
||||
mStream->SetReadPos(mStream->GetSize());
|
||||
return;
|
||||
}
|
||||
|
||||
int curId = mCmdCount;
|
||||
|
||||
|
@ -2318,7 +2321,11 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(BeValue*, value);
|
||||
CMD_PARAM(BeBlock*, comingFrom);
|
||||
|
||||
BF_ASSERT(phiValue->GetType() == value->GetType());
|
||||
if (phiValue->GetType() != value->GetType())
|
||||
{
|
||||
Fail("AddPhiIncoming type mismatch");
|
||||
break;
|
||||
}
|
||||
|
||||
auto phiIncoming = mBeModule->mAlloc.Alloc<BePhiIncoming>();
|
||||
phiIncoming->mBlock = comingFrom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue