summaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-18 20:42:00 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-18 20:42:00 +0000
commit2b3dbc20d03f9f6118166512f719a2b554adf725 (patch)
tree83c55501d7538240d73d1cd61690beae93dbce4b /gcc/cpphash.c
parent7ac05dd75c071e92632fa8d7b44fda5292d20576 (diff)
downloadgcc-2b3dbc20d03f9f6118166512f719a2b554adf725.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33236 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index bb13dda4132..6f28295bca9 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -26,8 +26,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "cpplib.h"
-#include "cpphash.h"
#include "hashtab.h"
+#include "cpphash.h"
+
#undef abort
static unsigned int hash_HASHNODE PARAMS ((const void *));
@@ -200,12 +201,13 @@ _cpp_lookup (pfile, name, len)
}
/* Find the hashtable slot for name "name". Used to insert or delete. */
+
HASHNODE **
_cpp_lookup_slot (pfile, name, len, insert, hash)
cpp_reader *pfile;
const U_CHAR *name;
int len;
- int insert;
+ enum insert_option insert;
unsigned long *hash;
{
const U_CHAR *bp;
@@ -214,7 +216,9 @@ _cpp_lookup_slot (pfile, name, len, insert, hash)
if (len < 0)
{
- for (bp = name; is_idchar (*bp); bp++);
+ for (bp = name; is_idchar (*bp); bp++)
+ ;
+
len = bp - name;
}
@@ -223,7 +227,7 @@ _cpp_lookup_slot (pfile, name, len, insert, hash)
dummy.hash = _cpp_calc_hash (name, len);
slot = (HASHNODE **) htab_find_slot_with_hash (pfile->hashtab,
- (void *)&dummy,
+ (void *) &dummy,
dummy.hash, insert);
if (insert)
*hash = dummy.hash;