[PATCH] D119560: [OpenCL] opencl-c.h: remove arg names from atomics

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 10:01:23 PST 2022


svenvh created this revision.
svenvh added a reviewer: Anastasia.
Herald added subscribers: Naghasan, ldrumm, yaxunl.
svenvh requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This simplifies completeness comparisons against OpenCLBuiltins.td and
also makes the header no longer "claim" the identifiers "success",
"failure", "desired", "value" (such that you can compile with `-Dvalue=...`
when including the header for example, which currently breaks parsing
of the header).

I made this patch to be able to do some completeness comparisons locally
for D119420 <https://reviews.llvm.org/D119420>, and thought it might be worth committing anyway.

This is a big patch and it only touches the OpenCL 2 atomics for now.  I
wonder if we should remove argument names from the other builtins too?
I think it would help unifying the header and tablegen approaches: if we
gradually move the header into some canonical form, we might be able
to eventually replace it with a tablegen-ed header, while being able to
easily confirm equivalence.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119560

Files:
  clang/lib/Headers/opencl-c.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119560.407929.patch
Type: text/x-patch
Size: 239896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220211/59ba9f0a/attachment-0001.bin>


More information about the cfe-commits mailing list