소스 검색

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;
 		break;
 	case BfIRCmd_DbgGetCurrentLocation:
 	case BfIRCmd_DbgGetCurrentLocation:
 		{
 		{
-			SetResult(curId, mIRBuilder->getCurrentDebugLocation());
+			auto debugLoc = mIRBuilder->getCurrentDebugLocation();
+			if (!debugLoc)
+				debugLoc = mDebugLoc;
+			SetResult(curId, debugLoc);
 		}
 		}
 		break;
 		break;
 	case BfIRCmd_DbgSetType:
 	case BfIRCmd_DbgSetType: