fix cases where compoundlits are constant/get an entity
[cparser] / adt / pset_new.c
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   implementation of pset_new
23  * @author  Matthias Braun
24  */
25 #include "config.h"
26
27 #include "pset_new.h"
28
29 /** probing method: quadratic probing */
30 #define DO_REHASH
31 #define ID_HASH
32 #define HashSet                    pset_new_t
33 #define HashSetIterator            pset_new_iterator_t
34 #define ValueType                  void*
35 #define NullValue                  NULL
36 #define DeletedValue               ((void*)-1)
37 #define KeysEqual(this,key1,key2)  1
38 #define SetRangeEmpty(ptr,size)    memset(ptr, 0, (size) * sizeof(HashSetEntry))
39
40 #define hashset_init            pset_new_init
41 #define hashset_init_size       pset_new_init_size
42 #define hashset_destroy         pset_new_destroy
43 #define hashset_insert          pset_new_insert
44 #define hashset_remove          pset_new_remove
45 #define hashset_find            pset_new_contains
46 #define hashset_size            pset_new_size
47 #define hashset_iterator_init   pset_new_iterator_init
48 #define hashset_iterator_next   pset_new_iterator_next
49 #define hashset_remove_iterator pset_new_remove_iterator
50
51 #include "hashset.c.inl"