[libomptarget][nfc] Replace static const with enum
Semantically identical. Replaces 0xff... with ~0 to spare counting the f.
Has the advantage that the compiler doesn't need to prove the 4/8 byte
value dead before discarding it, and sidesteps the compilation question
associated with what static means for a single source language.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D93328
return (((uint64_t)hi) << 32) | (uint64_t)lo;
}
-static const __kmpc_impl_lanemask_t __kmpc_impl_all_lanes =
- UINT64_C(0xffffffffffffffff);
+enum : __kmpc_impl_lanemask_t {
+ __kmpc_impl_all_lanes = ~(__kmpc_impl_lanemask_t)0
+};
DEVICE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_lt();
return val;
}
-static const __kmpc_impl_lanemask_t __kmpc_impl_all_lanes =
- UINT32_C(0xffffffff);
+enum : __kmpc_impl_lanemask_t {
+ __kmpc_impl_all_lanes = ~(__kmpc_impl_lanemask_t)0
+};
INLINE __kmpc_impl_lanemask_t __kmpc_impl_lanemask_lt() {
__kmpc_impl_lanemask_t res;