forked from OSchip/llvm-project
Revert "[OpenCL] Allow optional __generic in __remove_address_space utility"
This reverts commit 81081daef0
.
This commit is contained in:
parent
ae14fae0ff
commit
d85d57e987
|
@ -600,11 +600,9 @@ typedef struct {
|
||||||
// C++ for OpenCL - __remove_address_space
|
// C++ for OpenCL - __remove_address_space
|
||||||
#if defined(__OPENCL_CPP_VERSION__)
|
#if defined(__OPENCL_CPP_VERSION__)
|
||||||
template <typename _Tp> struct __remove_address_space { using type = _Tp; };
|
template <typename _Tp> struct __remove_address_space { using type = _Tp; };
|
||||||
#if defined(__opencl_c_generic_address_space)
|
|
||||||
template <typename _Tp> struct __remove_address_space<__generic _Tp> {
|
template <typename _Tp> struct __remove_address_space<__generic _Tp> {
|
||||||
using type = _Tp;
|
using type = _Tp;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
template <typename _Tp> struct __remove_address_space<__global _Tp> {
|
template <typename _Tp> struct __remove_address_space<__global _Tp> {
|
||||||
using type = _Tp;
|
using type = _Tp;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
// RUN: %clang_cc1 %s -cl-std=clc++1.0 -fdeclare-opencl-builtins -finclude-default-header
|
// RUN: %clang_cc1 %s -cl-std=clc++ -fdeclare-opencl-builtins -finclude-default-header
|
||||||
// RUN: %clang_cc1 %s -cl-std=clc++2021 -fdeclare-opencl-builtins -finclude-default-header
|
|
||||||
// RUN: %clang_cc1 %s -cl-std=clc++2021 -cl-ext=-__opencl_c_generic_address_space,-__opencl_c_pipes -fdeclare-opencl-builtins -finclude-default-header
|
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
struct is_same {
|
struct is_same {
|
||||||
|
@ -21,10 +19,8 @@ void test_is_same() {
|
||||||
void test_remove_address_space() {
|
void test_remove_address_space() {
|
||||||
static_assert(is_same<__remove_address_space<int>::type, int>::value,
|
static_assert(is_same<__remove_address_space<int>::type, int>::value,
|
||||||
"type without an address space unexpectedly modified by __remove_address_space");
|
"type without an address space unexpectedly modified by __remove_address_space");
|
||||||
#if defined(__opencl_c_generic_address_space)
|
|
||||||
static_assert(is_same<__remove_address_space<__generic int>::type, int>::value,
|
static_assert(is_same<__remove_address_space<__generic int>::type, int>::value,
|
||||||
"__generic address space not removed by __remove_address_space");
|
"__generic address space not removed by __remove_address_space");
|
||||||
#endif
|
|
||||||
static_assert(is_same<__remove_address_space<__global char>::type, char>::value,
|
static_assert(is_same<__remove_address_space<__global char>::type, char>::value,
|
||||||
"__global address space not removed by __remove_address_space");
|
"__global address space not removed by __remove_address_space");
|
||||||
static_assert(is_same<__remove_address_space<__private ulong>::type, ulong>::value,
|
static_assert(is_same<__remove_address_space<__private ulong>::type, ulong>::value,
|
||||||
|
|
Loading…
Reference in New Issue