[Openmp-commits] [openmp] 9c87466 - [OpenMP] Use `abort` not `error` for fatal runtime exceptions
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 24 13:18:05 PDT 2020
Author: Johannes Doerfert
Date: 2020-07-24T15:15:38-05:00
New Revision: 9c87466c3960145eb5baa2881d4239de1dcfbc6f
URL: https://github.com/llvm/llvm-project/commit/9c87466c3960145eb5baa2881d4239de1dcfbc6f
DIFF: https://github.com/llvm/llvm-project/commit/9c87466c3960145eb5baa2881d4239de1dcfbc6f.diff
LOG: [OpenMP] Use `abort` not `error` for fatal runtime exceptions
See PR46515 for the rational but generally, we want to *really* abort
not gracefully shut down.
Reviewed By: grokos, ABataev
Differential Revision: https://reviews.llvm.org/D83963
Added:
Modified:
openmp/libomptarget/src/private.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h
index 7772175cdca2..ba2f161c7927 100644
--- a/openmp/libomptarget/src/private.h
+++ b/openmp/libomptarget/src/private.h
@@ -93,17 +93,17 @@ typedef int (*TargetDataFuncPtrTy)(DeviceTy &, int32_t, void **, void **,
fprintf(stderr, "Libomptarget message: " _str "\n", __VA_ARGS__); \
} while (0)
-#define FATAL_MESSAGE0(_num, _str) \
- do { \
- fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \
- exit(1); \
+#define FATAL_MESSAGE0(_num, _str) \
+ do { \
+ fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \
+ abort(); \
} while (0)
-#define FATAL_MESSAGE(_num, _str, ...) \
- do { \
- fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \
- __VA_ARGS__); \
- exit(1); \
+#define FATAL_MESSAGE(_num, _str, ...) \
+ do { \
+ fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \
+ __VA_ARGS__); \
+ abort(); \
} while (0)
// Implemented in libomp, they are called from within __tgt_* functions.
More information about the Openmp-commits
mailing list