Prechádzať zdrojové kódy

DbgGetCurrentLocation failover

Brian Fiete 1 rok pred
rodič
commit
7f480846ed
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      IDEHelper/Compiler/BfIRCodeGen.cpp

+ 4 - 1
IDEHelper/Compiler/BfIRCodeGen.cpp

@@ -4897,7 +4897,10 @@ void BfIRCodeGen::HandleNextCmd()
 		break;
 	case BfIRCmd_DbgGetCurrentLocation:
 		{
-			SetResult(curId, mIRBuilder->getCurrentDebugLocation());
+			auto debugLoc = mIRBuilder->getCurrentDebugLocation();
+			if (!debugLoc)
+				debugLoc = mDebugLoc;
+			SetResult(curId, debugLoc);
 		}
 		break;
 	case BfIRCmd_DbgSetType: