[PATCH] D96771: [OpenCL] Add distinct file extension for C++ for OpenCL

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 08:50:11 PST 2021


Anastasia added a comment.

In D96771#2571582 <https://reviews.llvm.org/D96771#2571582>, @awarzynski wrote:

> Hi @Anastasia , thank you for working on this!
>
> IIUC, this patch introduces:
>
> - new input types: `TY_CLCXX` and `TY_CLCXXHeader`
> - new language: `OpenCLCXX`
>
> Based on the attached test, this is only to remove the need for `-cl-std=clc++`. Do you expect any other benefits of introducing the above ^^^?

This is only the initial patch and for the moment the primary goal is to remove the need for the flag at least from the clang perspective.

> And are you planning to to update the OpenCL C++ tests not to use  `-cl-std=clc++`?

I was not sure about this. I just dislike the fact that moving files in the repo complicates the commit history lookup so I was not sure if the renaming was good or bad thing. Do you have any suggestions?

I was thinking to introduce as a guideline that the new tests should definitely use the new extension though.

I find the way driver is setup for the languages quite different so I was wondering if we have any guidelines?



================
Comment at: clang/lib/Driver/Types.cpp:163
 
-bool types::isOpenCL(ID Id) { return Id == TY_CL; }
+bool types::isOpenCL(ID Id) {
+  switch (Id) {
----------------
awarzynski wrote:
> This is not used.
This is used in the patch that is planned to be committed hopefully soon: 
https://reviews.llvm.org/D96515


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

https://reviews.llvm.org/D96771



More information about the cfe-commits mailing list