Makefile: small whitespace change
[smatch.git] / smatch_slist.h
blobbefdb3abbd1dcc2d8aa0105df3cb20f755b87070
1 DECLARE_PTR_LIST(state_list, struct sm_state);
2 DECLARE_PTR_LIST(state_list_stack, struct state_list);
3 struct named_slist {
4 char *name;
5 struct state_list *slist;
6 };
7 DECLARE_ALLOCATOR(named_slist);
8 DECLARE_PTR_LIST(named_stack, struct named_slist);
10 extern struct state_list_stack *implied_pools;
12 void __print_slist(struct state_list *slist);
13 void add_history(struct sm_state *sm);
14 int cmp_tracker(const struct sm_state *a, const struct sm_state *b);
15 char *alloc_sname(const char *str);
16 struct sm_state *alloc_sm_state(int owner, const char *name,
17 struct symbol *sym,
18 struct smatch_state *state);
20 void free_every_single_sm_state(void);
21 struct sm_state *clone_sm(struct sm_state *s);
22 int is_merged(struct sm_state *sm);
23 int is_implied(struct sm_state *sm);
24 struct state_list *clone_slist(struct state_list *from_slist);
25 struct state_list_stack *clone_stack(struct state_list_stack *from_stack);
27 int slist_has_state(struct state_list *slist, struct smatch_state *state);
28 struct smatch_state *merge_states(int owner, const char *name,
29 struct symbol *sym,
30 struct smatch_state *state1,
31 struct smatch_state *state2);
33 void add_pool(struct state_list_stack **pools, struct state_list *new);
34 struct sm_state *merge_sm_states(struct sm_state *one, struct sm_state *two);
35 struct smatch_state *get_state_slist(struct state_list *slist, int owner, const char *name,
36 struct symbol *sym);
38 struct sm_state *get_sm_state_slist(struct state_list *slist, int owner, const char *name,
39 struct symbol *sym);
41 void overwrite_sm_state(struct state_list **slist, struct sm_state *sm);
42 void overwrite_sm_state_stack(struct state_list_stack **stack, struct sm_state *sm);
43 struct sm_state *set_state_slist(struct state_list **slist, int owner, const char *name,
44 struct symbol *sym, struct smatch_state *state);
46 void delete_state_slist(struct state_list **slist, int owner, const char *name,
47 struct symbol *sym);
49 void delete_state_stack(struct state_list_stack **stack, int owner, const char *name,
50 struct symbol *sym);
51 void push_slist(struct state_list_stack **list_stack, struct state_list *slist);
53 struct state_list *pop_slist(struct state_list_stack **list_stack);
55 void free_slist(struct state_list **slist);
56 void free_stack(struct state_list_stack **stack);
57 void free_stack_and_slists(struct state_list_stack **slist_stack);
59 struct sm_state *set_state_stack(struct state_list_stack **stack, int owner, const char *name,
60 struct symbol *sym, struct smatch_state *state);
62 struct smatch_state *get_state_stack(struct state_list_stack *stack, int owner,
63 const char *name, struct symbol *sym);
65 void merge_slist(struct state_list **to, struct state_list *slist);
66 void filter_slist(struct state_list **slist, struct state_list *filter);
67 void and_slist_stack(struct state_list_stack **slist_stack);
69 void or_slist_stack(struct state_list_stack **pre_conds,
70 struct state_list *cur_slist,
71 struct state_list_stack **slist_stack);
73 struct state_list **get_slist_from_named_stack(struct named_stack *stack,
74 const char *name);
76 void overwrite_slist(struct state_list *from, struct state_list **to);