https://gcc.gnu.org/g:2cd76720c1584b55b05570894f602f05f1fc48ec

commit r15-3787-g2cd76720c1584b55b05570894f602f05f1fc48ec
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Sun Sep 22 19:26:02 2024 +0000

    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_apin...@quicinc.com>

Diff:
---
 gcc/gimple.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/gimple.h b/gcc/gimple.h
index ee986eaf1539..4a6e0e97d1e7 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  */

Reply via email to