[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 11:13:49 PDT 2021


azabaznov added inline comments.


================
Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:507
+    if (VersionIDs[I] >= MinVersion && VersionIDs[I] < MaxVersion) {
+      Encoded |= 1 << I;
+    }
----------------
svenvh wrote:
> azabaznov wrote:
> > nit: Encoded |= clang::encodeOpenCLVersion(VersionIDs[I]);
> I wish I could use `encodeOpenCLVersion` indeed, but the Clang headers are not available in TableGen (see comment on line 493).  I couldn't think of a better solution unfortunately, but let me know if you have any suggestions.
Oh, got it! I see no solution except conceptually changing this: allow including clang headers in TableGen util. Seems like it's not possible yet. I think we can go ahead with your solution for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100492/new/

https://reviews.llvm.org/D100492



More information about the cfe-commits mailing list