aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto-macho.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto/lto-macho.c')
-rw-r--r--gcc/lto/lto-macho.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/gcc/lto/lto-macho.c b/gcc/lto/lto-macho.c
index 1ba74c0a3a0..9f89e8e9bb3 100644
--- a/gcc/lto/lto-macho.c
+++ b/gcc/lto/lto-macho.c
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "diagnostic-core.h"
#include "toplev.h"
#include "lto.h"
#include "tm.h"
@@ -140,28 +141,6 @@ lto_file_init (lto_file *file, const char *filename, off_t offset)
file->offset = offset;
}
-/* Returns a hash code for P. */
-
-static hashval_t
-hash_name (const void *p)
-{
- const struct lto_section_slot *s = (const struct lto_section_slot *) p;
- return (hashval_t) htab_hash_string (s->name);
-}
-
-/* Returns nonzero if P1 and P2 are equal. */
-
-static int
-eq_name (const void *p1, const void *p2)
-{
- const struct lto_section_slot *s1 =
- (const struct lto_section_slot *) p1;
- const struct lto_section_slot *s2 =
- (const struct lto_section_slot *) p2;
-
- return strcmp (s1->name, s2->name) == 0;
-}
-
/* Build a hash table whose key is the section names and whose data is
the start and size of each section in the .o file. */
@@ -176,7 +155,7 @@ lto_obj_build_section_table (lto_file *lto_file)
char *strtab = NULL;
int i;
- section_hash_table = htab_create (37, hash_name, eq_name, free);
+ section_hash_table = lto_obj_create_section_hash_table ();
/* Seek the string table. */
/* FIXME The segment name should be in darwin.h, but can we include it