[clang] [RFC][Clang] Add __builtin_pointee_address_space (PR #210242)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 20:46:05 PDT 2026
================
@@ -115,6 +99,112 @@ inline bool isPtrSizeAddressSpace(LangAS AS) {
AS == LangAS::ptr64);
}
+namespace PointeeAddressSpace {
+
+enum ID : unsigned {
+ Default = 0,
+ OpenCLGlobal = 1,
+ OpenCLLocal = 2,
+ OpenCLConstant = 3,
+ OpenCLPrivate = 4,
+ OpenCLGeneric = 5,
+ OpenCLGlobalDevice = 6,
+ OpenCLGlobalHost = 7,
----------------
yxsamliu wrote:
Thanks. I removed the separate values and macros for these deprecated OpenCL and SYCL address spaces. The builtin now reports them as their corresponding global address space, with OpenCL and SYCL tests.
https://github.com/llvm/llvm-project/pull/210242
More information about the cfe-commits
mailing list