1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed circular data dependency with comptime debugging

This commit is contained in:
Brian Fiete 2025-01-24 06:39:07 -08:00
parent 1ee4c26445
commit 9a9e12ea37

View file

@ -21158,8 +21158,10 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
if (mDICompileUnit)
{
// Note: for comptime we need to ensure we don't force type population with DbgGetTypeInst here, as that
// can generate a CeMachine InitType circular data reference
int flags = 0;
BfIRMDNode funcScope = mBfIRBuilder->DbgGetTypeInst(mCurTypeInstance);
BfIRMDNode funcScope = mBfIRBuilder->DbgGetTypeInst(mCurTypeInstance, BfIRPopulateType_Identity);
if (methodDef->mProtection == BfProtection_Public)
flags = llvm::DINode::FlagPublic;