[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
Tue Oct 3 19:58:52 PDT 2017
rjmccall added a comment.
Why is most of this patch necessary under the design of adding a non-canonical __private address space?
================
Comment at: include/clang/AST/Type.h:336
+ /// space makes difference.
+ bool getImplicitAddressSpaceFlag() const { return Mask & IMask; }
+ void setImplicitAddressSpaceFlag(bool Value) {
----------------
isAddressSpaceImplicit()
================
Comment at: include/clang/AST/Type.h:337
+ bool getImplicitAddressSpaceFlag() const { return Mask & IMask; }
+ void setImplicitAddressSpaceFlag(bool Value) {
+ Mask = (Mask & ~IMask) | (((uint32_t)Value) << IShift);
----------------
setAddressSpaceImplicit
================
Comment at: lib/AST/ItaniumMangle.cpp:2232
case LangAS::opencl_constant: ASString = "CLconstant"; break;
+ case LangAS::opencl_private: ASString = "CLprivate"; break;
case LangAS::opencl_generic: ASString = "CLgeneric"; break;
----------------
In what situation is this mangled? I thought we agree this was non-canonical.
https://reviews.llvm.org/D35082
More information about the cfe-commits
mailing list