[llvm-bugs] [Bug 45326] New: [C++] Support address space in type traits
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 27 03:59:09 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: anastasia.stulova at arm.com
CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200327/764cf799/attachment.html>
More information about the llvm-bugs
mailing list