]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gimple: Remove custom remove_pointer
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 22 Sep 2024 19:26:02 +0000 (19:26 +0000)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 23 Sep 2024 07:45:50 +0000 (00:45 -0700)
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>
gcc/gimple.h

index ee986eaf15397522efcd6ca0c73af0c02d97ff8f..4a6e0e97d1e7f71a3f974b4271a9a1fd8c35b340 100644 (file)
@@ -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  */