[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 15:28:00 PDT 2017
rjmccall added a comment.
A few minor comments; feel free to commit after addressing them.
================
Comment at: include/clang/Basic/AddressSpaces.h:34
// OpenCL specific address spaces.
opencl_global,
----------------
yaxunl wrote:
> rjmccall wrote:
> > I think you need a real comment about the design of OpenCL address spaces here. Specifically, it is important to note that OpenCL no longer uses LangAS::Default for anything except r-values.
> Will do.
Thanks, WFM.
================
Comment at: lib/AST/TypePrinter.cpp:1703
OS << "__shared";
break;
default:
----------------
Please add the case here, even if it's unreachable for now.
================
Comment at: lib/Sema/SemaType.cpp:5754
default:
assert(Attr.getKind() == AttributeList::AT_OpenCLPrivateAddressSpace);
+ ASIdx = LangAS::opencl_private; break;
----------------
Please just make this a case, and then the default can be llvm_unreachable.
https://reviews.llvm.org/D35082
More information about the cfe-commits
mailing list