[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
Wed Oct 11 14:19:56 PDT 2017
rjmccall added a comment.
It sounds like there's agreement about the basic technical direction of introducing LangAS::opencl_private. Please introduce isAddressSpaceImplicit() in a different patch and make this patch just about the introduction of LangAS::opencl_private. You can have the pretty-printer just ignore __private for now, which should avoid gratuitous diagnostic changes.
I would like you to investigate using AttributedType for the pretty-printing and address-space semantic checks before adding isAddressSpaceImplicit().
Comment at: include/clang/AST/Type.h:562
+ static const uint32_t IMask = 0x200;
+ static const uint32_t IShift = 9;
static const uint32_t AddressSpaceMask =
"I" is not an appropriate abbreviation for "AddressSpaceImplicit".
Comment at: include/clang/Basic/AddressSpaces.h:34
// OpenCL specific address spaces.
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.
More information about the cfe-commits