diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-09-22 19:26:02 +0000 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-09-23 00:45:50 -0700 |
commit | 2cd76720c1584b55b05570894f602f05f1fc48ec (patch) | |
tree | c63b63c52cf15d5a265e170d9c35a02d2325bd05 /gcc | |
parent | 0d68bfe2bff7e7022e173bedfb918b796d3cb0af (diff) | |
download | gcc-2cd76720c1584b55b05570894f602f05f1fc48ec.zip gcc-2cd76720c1584b55b05570894f602f05f1fc48ec.tar.gz gcc-2cd76720c1584b55b05570894f602f05f1fc48ec.tar.bz2 |
gimple: Remove custom remove_pointer
Since r11-2700-g22dc89f8073cd0, type_traits has been included via system.h so
we don't need a custom version for gimple.h.
Note a small C++14 cleanup is to use remove_pointer_t directly here instead
of remove_pointer<t>::type.
bootstrapped and tested on x86_64-linux-gnu
gcc/ChangeLog:
* gimple.h (remove_pointer): Remove.
(GIMPLE_CHECK2): Use std::remove_pointer instead of custom one.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index ee986ea..4a6e0e9 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -37,10 +37,6 @@ enum gimple_code { extern const char *const gimple_code_name[]; extern const unsigned char gimple_rhs_class_table[]; -/* Strip the outermost pointer, from tr1/type_traits. */ -template<typename T> struct remove_pointer { typedef T type; }; -template<typename T> struct remove_pointer<T *> { typedef T type; }; - /* Error out if a gimple tuple is addressed incorrectly. */ #if defined ENABLE_GIMPLE_CHECKING #define gcc_gimple_checking_assert(EXPR) gcc_assert (EXPR) @@ -72,7 +68,7 @@ GIMPLE_CHECK2(const gimple *gs, T ret = dyn_cast <T> (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer<T>::type::code_, ERROR_MARK); + std::remove_pointer<T>::type::code_, ERROR_MARK); return ret; } template <typename T> @@ -91,7 +87,7 @@ GIMPLE_CHECK2(gimple *gs, T ret = dyn_cast <T> (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer<T>::type::code_, ERROR_MARK); + std::remove_pointer<T>::type::code_, ERROR_MARK); return ret; } #else /* not ENABLE_GIMPLE_CHECKING */ |