https://bugs.llvm.org/show_bug.cgi?id=45326

            Bug ID: 45326
           Summary: [C++] Support address space in type traits
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Removing address space from type is a useful feature. However extensions can't
be added into libcxx and OpenCL doesn't support libcxx currently anyway.

We need to find a place to add the type traits.

For removing address space we could just add this in some header:


  template <class _Tp> struct __remove_address_space { typedef _Tp type; };
  template <class _Tp> struct __remove_address_space<_Tp __generic> { typedef
_Tp type; };
  template <class _Tp> struct __remove_address_space<_Tp __global> { typedef
_Tp type; };
  template <class _Tp> struct __remove_address_space<_Tp __private> { typedef
_Tp type; };
  template <class _Tp> struct __remove_address_space<_Tp __local> { typedef _Tp
type; };
  template <class _Tp> struct __remove_address_space<_Tp __constant> { typedef
_Tp type; };

We can also use more generalized impl from https://reviews.llvm.org/D76636

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to