1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Failover case for unhandled type in CreateTypeDeclaration

This commit is contained in:
Brian Fiete 2023-11-04 08:38:24 -07:00
parent 30d5bbfa0c
commit b889a7e208
2 changed files with 11 additions and 1 deletions

View file

@ -2720,7 +2720,7 @@ public:
#endif
void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
{
{
auto populateModule = mModule->mContext->mUnreifiedModule;
auto typeInstance = type->ToTypeInstance();
if ((typeInstance != NULL) && (typeInstance->mModule != NULL))
@ -3108,6 +3108,12 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
}
return;
}
else
{
irType = GetPrimitiveType(BfTypeCode_None);
if (wantDIData)
diType = DbgCreateBasicType("void", 0, 0, llvm::dwarf::DW_ATE_address);
}
if (irType)
SetType(type, irType);