1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Fixed dep issue during ConstantToCurrent with null mCurTypeInstance

This commit is contained in:
Brian Fiete 2022-02-05 11:37:43 -05:00
parent faefc68cc0
commit 662566ed16

View file

@ -11258,7 +11258,8 @@ BfIRValue BfModule::ConstantToCurrent(BfConstant* constant, BfIRConstHolder* con
if (constant->mConstType == Beefy::BfConstType_TypeOf) if (constant->mConstType == Beefy::BfConstType_TypeOf)
{ {
auto constTypeOf = (BfTypeOf_Const*)constant; auto constTypeOf = (BfTypeOf_Const*)constant;
AddDependency(constTypeOf->mType, mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference); if (mCurTypeInstance != NULL)
AddDependency(constTypeOf->mType, mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference);
return CreateTypeDataRef(constTypeOf->mType); return CreateTypeDataRef(constTypeOf->mType);
} }