Release coccinelle-0.1
[bpt/coccinelle.git] / extra / c_info.mli
CommitLineData
34e49164
C
1open Common
2
3type 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}
13val print_entities : entities -> unit
14
15type 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
23type file_info = {
24 used : entities;
25 defined : entities;
26 is_module : bool;
27}
28
29type global_definitions = idx_entities
30
31type dependencies_graph =
32 ((filename * file_info) * string, bool) Ograph_extended.ograph_mutable
33
34
35val defined_stuff : (Ast_c.toplevel * 'a) list -> entities
36val used_stuff : (Ast_c.toplevel * 'a) list -> entities
37(* is_module *)
38val extra_stuff : (Ast_c.toplevel * 'a) list -> bool
39
40val adjust_used_only_external : entities -> entities -> unit
41
42val mk_global_definitions_index :
43 (filename * file_info) list -> idx_entities
44val check_no_duplicate_global_definitions :
45 idx_entities -> unit
46
47
48val build_graph :
49 (filename * file_info) list -> idx_entities -> filename (*outfile*) ->
50 ((filename * file_info) * string, bool) Ograph_extended.ograph_mutable
51
52
53val generate_makefile : dependencies_graph -> filename -> unit