Procházet zdrojové kódy

Fixed circular data dependency with comptime debugging

Brian Fiete před 8 měsíci
rodič
revize
9a9e12ea37
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      IDEHelper/Compiler/BfModule.cpp

+ 3 - 1
IDEHelper/Compiler/BfModule.cpp

@@ -21158,8 +21158,10 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
 
 
 		if (mDICompileUnit)
 		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;
 			int flags = 0;
-			BfIRMDNode funcScope = mBfIRBuilder->DbgGetTypeInst(mCurTypeInstance);
+			BfIRMDNode funcScope = mBfIRBuilder->DbgGetTypeInst(mCurTypeInstance, BfIRPopulateType_Identity);
 
 
 			if (methodDef->mProtection == BfProtection_Public)
 			if (methodDef->mProtection == BfProtection_Public)
 				flags = llvm::DINode::FlagPublic;
 				flags = llvm::DINode::FlagPublic;