[clang] [llvm] Make OpenCL an OSType rather than an EnvironmentType. (PR #170297)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 11 01:22:01 PST 2026


Keenuts wrote:

> I agree, OpenCL is not an OS, but neither is Vulkan, as far as I know. I remember @Keenuts explaining why they did go for making Vulkan an `OSType`, but can't find the reference now. I think the point was that they needed the environment type for the shading stages (e.g. `spirv-unknown-vulkan-pixel`, `spirv-unknown-vulkan-vertex`). Please, @Keenuts, correct me if I'm wrong. This PR just aligns `OpenCL` with `Vulkan`.

Yes, that's correct. Because the environment part of the triple was reserved for `pixel/compute/vertex/lib/etc`, it made "sense" (if you squint enough) to consider Vulkan/ShaderModel/OpenCL an OS. At least it allowed us to align to what DXIL+ShaderModel was doing.

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


More information about the cfe-commits mailing list