[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 26 15:31:32 PDT 2017

yaxunl marked an inline comment as done.
yaxunl added inline comments.

Comment at: lib/Sema/SemaType.cpp:6974
+  if (state.getSema().getLangOpts().OpenCL && !hasOpenCLAddressSpace &&
+      type.getAddressSpace() == LangAS::Default &&
Anastasia wrote:
> I am not very convinced we need to do all this check really... I think since we have to live with this code further and maintain it let's try to simplify it a bit. This can also help us avoid redundant checks. Perhaps we could even move it out in a separate function?
> How about some sort of hierarchical check structure like:
> | |**CL version?** ||
> |<2.0||>=2.0|
> |`private`||**Type?**||
> ||pointer||non-pointer|
> ||`generic`||**Scope?**||
> |||program||function|
> |||`global`||**Qualifiers?**|
> ||||none||static/extern|
> ||||`private`||`global`|


More information about the cfe-commits mailing list