pointer-set.h revision 267654
1218885Sdim/* Set operations on pointers
2218885Sdim   Copyright (C) 2004 Free Software Foundation, Inc.
3353358Sdim
4353358SdimThis file is part of GCC.
5353358Sdim
6218885SdimGCC is free software; you can redistribute it and/or modify it under
7218885Sdimthe terms of the GNU General Public License as published by the Free
8218885SdimSoftware Foundation; either version 2, or (at your option) any later
9218885Sdimversion.
10249423Sdim
11218885SdimGCC is distributed in the hope that it will be useful, but WITHOUT ANY
12218885SdimWARRANTY; without even the implied warranty of MERCHANTABILITY or
13218885SdimFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14218885Sdimfor more details.
15218885Sdim
16218885SdimYou should have received a copy of the GNU General Public License
17218885Sdimalong with GCC; see the file COPYING.  If not, write to the Free
18218885SdimSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
19218885Sdim02110-1301, USA.  */
20218885Sdim
21218885Sdim#ifndef POINTER_SET_H
22218885Sdim#define POINTER_SET_H
23218885Sdim
24218885Sdimstruct pointer_set_t;
25218885Sdimstruct pointer_set_t *pointer_set_create (void);
26218885Sdimvoid pointer_set_destroy (struct pointer_set_t *pset);
27218885Sdim
28218885Sdimint pointer_set_contains (struct pointer_set_t *pset, void *p);
29218885Sdimint pointer_set_insert (struct pointer_set_t *pset, void *p);
30296417Sdimvoid pointer_set_traverse (struct pointer_set_t *, bool (*) (void *, void *),
31218885Sdim			   void *);
32218885Sdim
33218885Sdimstruct pointer_map_t;
34218885Sdimstruct pointer_map_t *pointer_map_create (void);
35218885Sdimvoid pointer_map_destroy (struct pointer_map_t *pmap);
36276479Sdim
37276479Sdimvoid **pointer_map_contains (struct pointer_map_t *pmap, void *p);
38276479Sdimvoid **pointer_map_insert (struct pointer_map_t *pmap, void *p);
39218885Sdimvoid pointer_map_traverse (struct pointer_map_t *,
40218885Sdim			   bool (*) (void *, void **, void *), void *);
41218885Sdim
42218885Sdim#endif  /* POINTER_SET_H  */
43218885Sdim