summaryrefslogtreecommitdiff
path: root/offload/include/Shared
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2025-01-09 13:59:21 -0600
committerGitHub <noreply@github.com>2025-01-09 13:59:21 -0600
commitf53cb84df6b80458cb4d5ab7398a590356a3a952 (patch)
tree71d8763b66b7c71ae616c88d7f486c49b4332bd1 /offload/include/Shared
parentb57c0bac81fe4f5c85c6554ca574cf2d5648e0c5 (diff)
[OpenMP] Use __builtin_bit_cast instead of UB type punning (#122325)
Summary: Use a normal bitcast, remove from the shared utils since it's not available in GCC 7.4
Diffstat (limited to 'offload/include/Shared')
-rw-r--r--offload/include/Shared/Utils.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/offload/include/Shared/Utils.h b/offload/include/Shared/Utils.h
index 83a82678312c..523e6bc505b8 100644
--- a/offload/include/Shared/Utils.h
+++ b/offload/include/Shared/Utils.h
@@ -68,11 +68,6 @@ inline uint32_t popc(uint64_t V) {
return __builtin_popcountl(V);
}
-template <typename DstTy, typename SrcTy> inline DstTy convertViaPun(SrcTy V) {
- static_assert(sizeof(DstTy) == sizeof(SrcTy), "Bad conversion");
- return *((DstTy *)(&V));
-}
-
} // namespace utils
#endif // OMPTARGET_SHARED_UTILS_H