================ @@ -93,16 +73,6 @@ __SPIRV_BUILTIN_ALIAS(__builtin_spirv_generic_cast_to_ptr_explicit) __private const void * __spirv_GenericCastToPtrExplicit_ToPrivate(__generic const void *, int) __SPIRV_NOEXCEPT; -extern __SPIRV_overloadable -__SPIRV_BUILTIN_ALIAS(__builtin_spirv_generic_cast_to_ptr_explicit) -__private volatile void * -__spirv_GenericCastToPtrExplicit_ToPrivate(__generic volatile void *, - int) __SPIRV_NOEXCEPT; -extern __SPIRV_overloadable -__SPIRV_BUILTIN_ALIAS(__builtin_spirv_generic_cast_to_ptr_explicit) -__private const volatile void * -__spirv_GenericCastToPtrExplicit_ToPrivate(__generic const volatile void *, - int) __SPIRV_NOEXCEPT; ---------------- wenju-he wrote:
> While I agree with your point, that imposes a cast for the user. the cast at user site is only necessary if the input pointer argument is already `volatile`, right? In such case, any built-in that uses the pointer arg will have the same issue, i.e. casting is needed. So it is a general issue. IMO whether volatile is present should reflect how the built-in uses the pointer argument, similar as when we adds an specific attribute for a function argument. https://github.com/llvm/llvm-project/pull/146298 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits