]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
go: use htab_eq_string in godump
authorTom Tromey <tom@tromey.com>
Thu, 29 Apr 2021 00:47:15 +0000 (18:47 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 6 May 2021 14:51:28 +0000 (08:51 -0600)
This changes godump to use the new htab_eq_string function.

gcc

* godump.c (string_hash_eq): Remove.
(go_finish): Use htab_eq_string.

gcc/godump.c

index 7864d9d63e5d57c51a58966d907a79d54c83f18b..cf9989490356856e01559f7b3a9398fc1a9b6bba 100644 (file)
@@ -109,14 +109,6 @@ macro_hash_del (void *v)
   XDELETE (mhv);
 }
 
-/* For the string hash tables.  */
-
-static int
-string_hash_eq (const void *y1, const void *y2)
-{
-  return strcmp ((const char *) y1, (const char *) y2) == 0;
-}
-
 /* A macro definition.  */
 
 static void
@@ -1374,11 +1366,11 @@ go_finish (const char *filename)
   real_debug_hooks->finish (filename);
 
   container.type_hash = htab_create (100, htab_hash_string,
-                                     string_hash_eq, NULL);
+                                    htab_eq_string, NULL);
   container.invalid_hash = htab_create (10, htab_hash_string,
-                                       string_hash_eq, NULL);
+                                       htab_eq_string, NULL);
   container.keyword_hash = htab_create (50, htab_hash_string,
-                                        string_hash_eq, NULL);
+                                       htab_eq_string, NULL);
   obstack_init (&container.type_obstack);
 
   keyword_hash_init (&container);