let get_kf_fi proj kf =
let fct_var = Kernel_function.get_vi kf in
try Cil_datatype.Varinfo.Hashtbl.find proj.T.functions fct_var
with Not_found ->
let fi_def, is_def =
match kf.fundec with
| Declaration _ -> None, false
| Definition _ when !Db.Value.use_spec_instead_of_definition kf ->
None, false
| Definition (def, _) -> Some def, true
in
let new_fi = {
T.fi_kf = kf;
T.fi_def = fi_def;
T.fi_project = proj;
T.fi_top = None;
T.fi_level_option = get_default_level_option is_def;
T.fi_init_marks = None ;
T.fi_slices = [] ;
T.fi_next_ff_num = 1;
T.f_called_by = [] }
in
Cil_datatype.Varinfo.Hashtbl.add proj.T.functions fct_var new_fi;
new_fi