[llvm] [SPIR-V] Support for C++ for OpenCL source language (PR #188791)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 03:50:55 PDT 2026


================
@@ -662,6 +662,7 @@ defm GLSL : SourceLanguageOperand<2>;
 defm OpenCL_C : SourceLanguageOperand<3>;
 defm OpenCL_CPP : SourceLanguageOperand<4>;
 defm HLSL : SourceLanguageOperand<5>;
+defm CPP_for_OpenCL : SourceLanguageOperand<6>;
----------------
MrSidims wrote:

My understanding is that OpenCL_CPP is for the "old" OpenCL C++ that was part of OpenCL 2.2. Meanwhile CPP_for_OpenCL is for a case, when OpenCL device program is compiled with something like cl-std=clc++2021 .

On SPIR-V side both cases are declared in https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Source_Language 

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


More information about the llvm-commits mailing list