[PATCH] D118605: [OpenCL] Add support of language builtins for OpenCL C 3.0
    Sven van Haastregt via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Feb 11 06:00:03 PST 2022
    
    
  
svenvh added a comment.
In D118605#3313990 <https://reviews.llvm.org/D118605#3313990>, @Anastasia wrote:
> In D118605#3313859 <https://reviews.llvm.org/D118605#3313859>, @azabaznov wrote:
>
>>> There are tests checking for this (e.g. clang/test/Frontend/opencl.cl), so we need this check to preserve the existing behavior indeed.
>>
>> Thanks. The other test is `SemaOpenCL/clang-builtin-version.cl`.
>>
>>> But it might be worth asking someone outside of the OpenCL community whether it's desirable to use the LanguageID enum in this way.
>>
>> I personally think this looks good now, for OpenCL in particularly, as it became version-agnostic (except for DSE). But we still are querying language options only, and we expect language options for generic AS, pipes and DSE to be immutable at this point.
>
> Note that this `LanguageID` is intended for Builtins use because there are other `LanguageID`s used elsewhere.
Fair enough.  Just in case someone disagrees, there's always the option of giving the builtins a reserved name and providing a macro in `opencl-c-base.h` that maps the real name to the builtin, conditionalized on feature macros.  But macros have the drawback of less beautiful diagnostics, so if nobody objects we should keep what we have done currently I think.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118605/new/
https://reviews.llvm.org/D118605
    
    
More information about the cfe-commits
mailing list