From e38992e8d312b679eb3f4b9973567805a96511cb Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 18 Apr 2000 20:42:00 +0000 Subject: conflict.c (conflict_graph_add): Pass enum type to htab_find_slot. * gcc/conflict.c (conflict_graph_add): Pass enum type to htab_find_slot. * gcc/cpperror.c (hashtab.h): Now include. * gcc/cppexp.c (hashtab.h): Likewise. * gcc/cpplex.c (hashtab.h): Likewise. * gcc/cppfiles.c (hashtab.h): Likewise. (find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type to htab_find_slot_with_hash. * gcc/cpphash.c (hashtab.h): Now include. (_cpp_lookup_slot): INSERT is now enum insert_option. * gcc/cpphash.h (_cpp_lookup_slot): Likewise. * gcc/cppinit.c (hashtab.h): Include earlier. (initialize_builtins): Pass enum to htab_find_slot. * gcc/cpplib.c (hashtab.h): Now include. (do_define, do_undef): Pass enum type to _cpp_lookup_slot. (do_pragma_poison, do_assert): Likewise. * gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to htab_find_slot_with_hash. * gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise. * gcc/tree.c (type_hash_add): Likewise. (build1): Minor cleanup. * include/hashtab.h (enum insert_option): New type. (htab_find_slot, htab_find_slot_with_hash): Use it. * libiberty/hashtab.c: Various minor cleanups. (htab_find_slot_with_hash): INSERT is now enum insert_option. (htab_find_slot): Likewise. From-SVN: r33236 --- include/ChangeLog | 5 +++++ include/hashtab.h | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 4be8ffb..06c2894 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 18 16:22:30 2000 Richard Kenner + + * hashtab.h (enum insert_option): New type. + (htab_find_slot, htab_find_slot_with_hash): Use it. + 2000-04-17 Kaveh R. Ghazi * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add diff --git a/include/hashtab.h b/include/hashtab.h index 2426708..a516c45 100644 --- a/include/hashtab.h +++ b/include/hashtab.h @@ -102,6 +102,9 @@ struct htab typedef struct htab *htab_t; +/* An enum saying whether we insert into the hash table or not. */ +enum insert_option {NO_INSERT, INSERT}; + /* The prototypes of the package functions. */ extern htab_t htab_create PARAMS ((size_t, htab_hash, @@ -110,11 +113,13 @@ extern void htab_delete PARAMS ((htab_t)); extern void htab_empty PARAMS ((htab_t)); extern void *htab_find PARAMS ((htab_t, const void *)); -extern void **htab_find_slot PARAMS ((htab_t, const void *, int)); -extern void *htab_find_with_hash PARAMS ((htab_t, const void *, - hashval_t)); -extern void **htab_find_slot_with_hash PARAMS ((htab_t, const void *, - hashval_t, int)); +extern void **htab_find_slot PARAMS ((htab_t, const void *, + enum insert_option)); +extern void *htab_find_with_hash PARAMS ((htab_t, const void *, + hashval_t)); +extern void **htab_find_slot_with_hash PARAMS ((htab_t, const void *, + hashval_t, + enum insert_option)); extern void htab_clear_slot PARAMS ((htab_t, void **)); extern void htab_remove_elt PARAMS ((htab_t, void *)); -- cgit v1.1