From: Andrew Pinski Date: Sun, 22 Sep 2024 19:26:02 +0000 (+0000) Subject: gimple: Remove custom remove_pointer X-Git-Tag: basepoints/gcc-16~5766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cd76720c1584b55b05570894f602f05f1fc48ec;p=thirdparty%2Fgcc.git 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::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 --- diff --git a/gcc/gimple.h b/gcc/gimple.h index ee986eaf153..4a6e0e97d1e 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 struct remove_pointer { typedef T type; }; -template struct remove_pointer { 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 (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer::type::code_, ERROR_MARK); + std::remove_pointer::type::code_, ERROR_MARK); return ret; } template @@ -91,7 +87,7 @@ GIMPLE_CHECK2(gimple *gs, T ret = dyn_cast (gs); if (!ret) gimple_check_failed (gs, file, line, fun, - remove_pointer::type::code_, ERROR_MARK); + std::remove_pointer::type::code_, ERROR_MARK); return ret; } #else /* not ENABLE_GIMPLE_CHECKING */