[Openmp-commits] [openmp] 07f5cf1 - [OpenMP][libomptarget] Fixes possible no-return warning (#70808)
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Nov 6 07:45:07 PST 2023
Author: Jan Patrick Lehr
Date: 2023-11-06T16:45:03+01:00
New Revision: 07f5cf1992e1388f94cd538810a58b49cb18c0b7
URL: https://github.com/llvm/llvm-project/commit/07f5cf1992e1388f94cd538810a58b49cb18c0b7
DIFF: https://github.com/llvm/llvm-project/commit/07f5cf1992e1388f94cd538810a58b49cb18c0b7.diff
LOG: [OpenMP][libomptarget] Fixes possible no-return warning (#70808)
The UNREACHABLE macro resolves to message + trap, which may still warn, so we add call to __builtin_unreachable.
Added:
Modified:
openmp/libomptarget/DeviceRTL/include/Debug.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/include/Debug.h b/openmp/libomptarget/DeviceRTL/include/Debug.h
index bd4d40e8f24fd5b..22998f44a5bea5d 100644
--- a/openmp/libomptarget/DeviceRTL/include/Debug.h
+++ b/openmp/libomptarget/DeviceRTL/include/Debug.h
@@ -36,7 +36,8 @@ void __assert_fail_internal(const char *expr, const char *msg, const char *file,
}
#define UNREACHABLE(msg) \
PRINT(msg); \
- __builtin_trap();
+ __builtin_trap(); \
+ __builtin_unreachable();
///}
More information about the Openmp-commits
mailing list