ast2firm: Implement casting from complex to real types.
[cparser] / entitymap_t.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
4  */
5 #ifndef ENTITYMAP_T_H
6 #define ENTITYMAP_T_H
7
8 #include <libfirm/firm_types.h>
9 #include "symbol.h"
10
11 typedef struct entitymap_entry_t {
12         symbol_t  *symbol;
13         ir_entity *entity;
14 } entitymap_entry_t;
15
16 #define HashSet          entitymap_t
17 #define ValueType        entitymap_entry_t
18 #define DO_REHASH
19 #include "adt/hashset.h"
20 #undef DO_REHASH
21 #undef HashSetEntry
22 #undef HashSet
23
24 typedef struct entitymap_iterator_t  entitymap_iterator_t;
25 typedef struct entitymap_t           entitymap_t;
26
27 void entitymap_init(entitymap_t *map);
28
29 void entitymap_destroy(entitymap_t *map);
30
31 void entitymap_insert(entitymap_t *map, symbol_t *symbol, ir_entity *entity);
32
33 ir_entity *entitymap_get(const entitymap_t *map, symbol_t *symbol);
34
35 #endif