[clang] clang/AMDGPU: Add missing opencl feature macros (PR #170307)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 2 08:13:13 PST 2025


frasercrmck wrote:

> I'm not sure I understand these macros. The test seems to imply they should only be defined for OpenCL 3.0+, but the header requires them for the declarations unconditionally?

If I remember correctly, yes. They're only _required_ to be defined for OpenCL 3.0 but, since they are useful and there was no corresponding functionality pre-3.0, we define and use them for all OpenCL versions for a consistent feature availability framework.

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


More information about the cfe-commits mailing list