From 9a9e12ea3793e5f5ef83aec10f0128904e8353dd Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 24 Jan 2025 06:39:07 -0800 Subject: [PATCH] Fixed circular data dependency with comptime debugging --- IDEHelper/Compiler/BfModule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index b376e7ec..767b2cf4 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -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;