[clang] [Clang][Headers] Fix <gpuintrin.h> for SYCL (PR #152314)

Mészáros Gergely via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 19 05:42:54 PDT 2025


Maetveis wrote:

> This function was a little weird because the intrinsic specifies the address space I think. Do you know explicitly why we can't cast here? Seems weird that the compiler would fall over on this.

https://github.com/llvm/llvm-project/pull/152528 explores that a bit. `[[clang::opencl_generic]]` doesn't really make much sense, AFAICT it should be equivalent to the default language address space in SYCL. We could accept it as such, but would have to change the API of `asOpenCLLangAS` / `asSYCLLangAS` / `asHLSLLangAS` because they represent the condition of "not a <language> address space attribute" by returning `LangAS::Default`.

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


More information about the cfe-commits mailing list