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

Improved emitted static field lookup

This commit is contained in:
Brian Fiete 2022-06-28 08:33:30 -07:00
parent a69e1cfe6e
commit 1aca5f6771
3 changed files with 8 additions and 2 deletions

View file

@ -2714,7 +2714,7 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
{
auto populateModule = mModule->mContext->mUnreifiedModule;
auto typeInstance = type->ToTypeInstance();
if (typeInstance != NULL)
if ((typeInstance != NULL) && (typeInstance->mModule != NULL))
populateModule = typeInstance->mModule;
bool wantDIData = DbgHasInfo() && (!type->IsUnspecializedType());