mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Failover case for unhandled type in CreateTypeDeclaration
This commit is contained in:
parent
30d5bbfa0c
commit
b889a7e208
2 changed files with 11 additions and 1 deletions
|
@ -3448,6 +3448,8 @@ void BeIRCodeGen::HandleNextCmd()
|
||||||
CMD_PARAM(bool, alwaysPreserve);
|
CMD_PARAM(bool, alwaysPreserve);
|
||||||
CMD_PARAM(int, flags);
|
CMD_PARAM(int, flags);
|
||||||
|
|
||||||
|
BF_ASSERT(type != NULL);
|
||||||
|
|
||||||
auto dbgFunc = (BeDbgFunction*)scope;
|
auto dbgFunc = (BeDbgFunction*)scope;
|
||||||
|
|
||||||
auto dbgVar = mBeModule->mOwnedValues.Alloc<BeDbgVariable>();
|
auto dbgVar = mBeModule->mOwnedValues.Alloc<BeDbgVariable>();
|
||||||
|
@ -3498,6 +3500,8 @@ void BeIRCodeGen::HandleNextCmd()
|
||||||
CMD_PARAM(BeMDNode*, type);
|
CMD_PARAM(BeMDNode*, type);
|
||||||
CMD_PARAM(int, initType);
|
CMD_PARAM(int, initType);
|
||||||
|
|
||||||
|
BF_ASSERT(type != NULL);
|
||||||
|
|
||||||
auto dbgVar = mBeModule->mOwnedValues.Alloc<BeDbgVariable>();
|
auto dbgVar = mBeModule->mOwnedValues.Alloc<BeDbgVariable>();
|
||||||
dbgVar->mName = name;
|
dbgVar->mName = name;
|
||||||
dbgVar->mType = type;
|
dbgVar->mType = type;
|
||||||
|
|
|
@ -3108,6 +3108,12 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
irType = GetPrimitiveType(BfTypeCode_None);
|
||||||
|
if (wantDIData)
|
||||||
|
diType = DbgCreateBasicType("void", 0, 0, llvm::dwarf::DW_ATE_address);
|
||||||
|
}
|
||||||
|
|
||||||
if (irType)
|
if (irType)
|
||||||
SetType(type, irType);
|
SetType(type, irType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue