Commit | Line | Data |
---|---|---|
34e49164 C |
1 | open Common |
2 | ||
3 | type entities = { | |
4 | macros : string hashset; | |
5 | variables : string hashset; | |
6 | static_variables : string hashset; | |
7 | functions : string hashset; | |
8 | static_functions : string hashset; | |
9 | structs : string hashset; | |
10 | typedefs : string hashset; | |
11 | include_c : filename hashset; | |
12 | } | |
13 | val print_entities : entities -> unit | |
14 | ||
15 | type idx_entities = { | |
16 | idx_macros : (string, filename hashset) Hashtbl.t; | |
17 | idx_variables : (string, filename hashset) Hashtbl.t; | |
18 | idx_functions : (string, filename hashset) Hashtbl.t; | |
19 | idx_structs : (string, filename hashset) Hashtbl.t; | |
20 | idx_typedefs : (string, filename hashset) Hashtbl.t; | |
21 | } | |
22 | ||
23 | type file_info = { | |
24 | used : entities; | |
25 | defined : entities; | |
26 | is_module : bool; | |
27 | } | |
28 | ||
29 | type global_definitions = idx_entities | |
30 | ||
31 | type dependencies_graph = | |
32 | ((filename * file_info) * string, bool) Ograph_extended.ograph_mutable | |
33 | ||
34 | ||
35 | val defined_stuff : (Ast_c.toplevel * 'a) list -> entities | |
36 | val used_stuff : (Ast_c.toplevel * 'a) list -> entities | |
37 | (* is_module *) | |
38 | val extra_stuff : (Ast_c.toplevel * 'a) list -> bool | |
39 | ||
40 | val adjust_used_only_external : entities -> entities -> unit | |
41 | ||
42 | val mk_global_definitions_index : | |
43 | (filename * file_info) list -> idx_entities | |
44 | val check_no_duplicate_global_definitions : | |
45 | idx_entities -> unit | |
46 | ||
47 | ||
48 | val build_graph : | |
49 | (filename * file_info) list -> idx_entities -> filename (*outfile*) -> | |
50 | ((filename * file_info) * string, bool) Ograph_extended.ograph_mutable | |
51 | ||
52 | ||
53 | val generate_makefile : dependencies_graph -> filename -> unit |