瀏覽代碼

DbgGetCurrentLocation failover

Brian Fiete 1 年之前
父節點
當前提交
7f480846ed
共有 1 個文件被更改,包括 4 次插入1 次删除
  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: