[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
This commit is contained in:
Johannes Doerfert 2020-07-16 16:55:09 -05:00
parent dfa267a61c
commit 9c87466c39
1 changed files with 9 additions and 9 deletions

View File

@ -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.