diff mbox series

c++: Remove unused fn

Message ID 690ce3ac-98c7-d633-1118-aa43256f827a@acm.org
State New
Headers show
Series c++: Remove unused fn | expand

Commit Message

Nathan Sidwell Jan. 19, 2021, 2:51 p.m. UTC
Martin pointed out this is found with some warning modes.

I had two overloads of a function, but only one	was needed.  Let's keep
the constant one.

	gcc/cp/
         * modules.cc (identifier): Merge overloads.
diff mbox series

Patch

diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc
index 1fd0bcfe3eb..e9a5eaeb4b4 100644
--- i/gcc/cp/module.cc
+++ w/gcc/cp/module.cc
@@ -276,13 +276,10 @@  static inline cpp_hashnode *cpp_node (tree id)
 {
   return CPP_HASHNODE (GCC_IDENT_TO_HT_IDENT (id));
 }
-static inline tree identifier (cpp_hashnode *node)
-{
-  return HT_IDENT_TO_GCC_IDENT (HT_NODE (node));
-}
-static inline const_tree identifier (const cpp_hashnode *node)
+
+static inline tree identifier (const cpp_hashnode *node)
 {
-  return identifier (const_cast <cpp_hashnode *> (node));
+  return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast<cpp_hashnode *> (node)));
 }
 
 /* During duplicate detection we need to tell some comparators that