[libclc] [libclc] Move fp16 pragma guards out of header file (PR #122751)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 21:18:04 PST 2025


================
@@ -207,10 +207,6 @@
     return BUILTIN(x);                                                         \
   }
 
-#ifdef cl_khr_fp16
-
-#pragma OPENCL EXTENSION cl_khr_fp16 : enable
-
 #define _CLC_DEFINE_UNARY_BUILTIN_FP16(FUNCTION)                               \
   _CLC_DEF _CLC_OVERLOAD half FUNCTION(half x) {                               \
     return (half)FUNCTION((float)x);                                           \
----------------
arsenm wrote:

This is weird because we still have the reference to half in the header. Should the header just : disable it at the end?

https://github.com/llvm/llvm-project/pull/122751


More information about the cfe-commits mailing list