[clang] [Clang][OpenCL] Add OpenCL 3.1 language version (PR #204043)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 03:11:33 PDT 2026


================
@@ -604,7 +602,10 @@ static unsigned short EncodeVersions(unsigned int MinVersion,
     MaxVersion = UINT_MAX;
   }
 
-  unsigned VersionIDs[] = {100, 110, 120, 200, 300};
+  unsigned VersionIDs[] = {
+#define OPENCL_VERSION(VersionCode, Enumerator, BitValue) VersionCode,
+#include "clang/Basic/OpenCLVersions.def"
----------------
wenju-he wrote:

> I'm not sure if we are supposed to include this file here; see the comment about the layering violation that you removed.

done, reverted, thanks. I was wrong about the laying issue.

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


More information about the cfe-commits mailing list