================
@@ -2667,24 +2672,33 @@ std::string Qualifiers::getAddrSpaceAsString(LangAS AS)
{
case LangAS::Default:
return "";
case LangAS::opencl_global:
- case LangAS::sycl_global:
return "__global";
case LangAS::opencl_local:
- case LangAS::sycl_local:
return "__local";
case LangAS::opencl_private:
- case LangAS::sycl_private:
return "__private";
case LangAS::opencl_constant:
return "__constant";
case LangAS::opencl_generic:
return "__generic";
+ // TODO: Remove *_global_device and *_global_host after corresponding
+ // attributes are deprecated for the required time.
case LangAS::opencl_global_device:
case LangAS::sycl_global_device:
return "__global_device";
case LangAS::opencl_global_host:
case LangAS::sycl_global_host:
return "__global_host";
+ case LangAS::sycl_global:
+ return "sycl_global";
+ case LangAS::sycl_local:
+ return "sycl_local";
+ case LangAS::sycl_private:
+ return "sycl_private";
+ case LangAS::sycl_generic:
+ return "sycl_generic";
+ case LangAS::sycl_constant:
+ return "sycl_constant";
----------------
tahonermann wrote:
My reading of `Qualifiers::print()` below suggests these should return a string
containing the attribute syntax (see how the address space is handled when
`isTargetAddressSpace()` returns true). Can you try this and see what effect,
if any, it has on tests? If it has no effect, we should see if we can create
one.
```suggestion
case LangAS::sycl_global:
return "[[clang::sycl_global]]";
case LangAS::sycl_local:
return "[[clang::sycl_local]]";
case LangAS::sycl_private:
return "[[clang::sycl_private]]";
case LangAS::sycl_generic:
return "[[clang::sycl_generic]]";
case LangAS::sycl_constant:
return "[[clang::sycl_constant]]";
```
https://github.com/llvm/llvm-project/pull/200849
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits