Quellcode durchsuchen

Fixed circular data dependency with comptime debugging

Brian Fiete vor 8 Monaten
Ursprung
Commit
9a9e12ea37
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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)
 		{
+			// 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;