[flang-commits] [flang] [flang][NFC] replace std::exit by fir::emitFatalError in Lower/Runtime.cpp (PR #169050)

via flang-commits flang-commits at lists.llvm.org
Fri Nov 21 07:09:34 PST 2025


https://github.com/jeanPerier created https://github.com/llvm/llvm-project/pull/169050

None

>From 1cda6dbe1d737d783cdcb5b81d337448bf330654 Mon Sep 17 00:00:00 2001
From: Jean Perier <jperier at nvidia.com>
Date: Fri, 21 Nov 2025 07:07:13 -0800
Subject: [PATCH] [flang][NFC] replace std::exit by fir::emitFatalError

---
 flang/lib/Lower/Runtime.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/flang/lib/Lower/Runtime.cpp b/flang/lib/Lower/Runtime.cpp
index d5b8045d91992..9ff6157f7487d 100644
--- a/flang/lib/Lower/Runtime.cpp
+++ b/flang/lib/Lower/Runtime.cpp
@@ -90,8 +90,7 @@ void Fortran::lower::genStopStatement(
           operands.push_back(cast);
         },
         [&](auto) {
-          mlir::emitError(loc, "unhandled expression in STOP");
-          std::exit(1);
+          fir::emitFatalError(loc, "unhandled expression in STOP");
         });
   } else {
     callee = fir::runtime::getRuntimeFunc<mkRTKey(StopStatement)>(loc, builder);



More information about the flang-commits mailing list