3 * File name: ir/common/ident_t.h
4 * Purpose: Hash table to store names -- private header.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 1999-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
19 * Initialize the ident module.
21 * @param id_if The ident module interface, if NULL, the default
22 * libFirm ident module will be used.
23 * @param initial_n_idents Only used in the default libFirm ident module, initial
24 * number of entries in the hash table.
26 void init_ident (ident_if_t *id_if, int initial_n_idents);
29 * Finishes the ident module, frees all entries.
31 void finish_ident (void);
33 /** The hash function of the internal ident module implementation. */
34 #define ID_HASH(type, str, len) \
35 ((( ((type *)(str))[0] * 33 \
36 + ((type *)(str))[(len)>>1]) * 31 \
37 + ((type *)(str))[(len)-1]) * 9 \
40 # endif /* _IDENT_T_H_ */