Skip to content
Snippets Groups Projects
Commit 8541a3da authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[kernel] fix initialization of built-ins in a visitor-created project

Actually `create_from_visitor` was correct, but its sibling
`init_project_from_visitor` wasn't if not called from `create_from_visitor` and
is (erroneously?) exported in `file.mli`
parent 537007f4
No related branches found
No related tags found
No related merge requests found
......@@ -1600,7 +1600,7 @@ let init_project_from_visitor ?(reorder=false) prj
then
Kernel.fatal
"Visitor does not copy or does not operate on correct project.";
Project.on prj (fun () -> Cil.initCIL (fun () -> ()) (get_machdep ())) ();
Project.on prj init_cil ();
let old_ast = Ast.get () in
let ast = visitFramacFileCopy vis old_ast in
let finalize ast =
......@@ -1637,7 +1637,6 @@ let create_project_from_visitor ?reorder ?(last=true) prj_name visitor =
Project.copy
~selection:(Parameter_state.get_reset_selection ()) ~src:temp prj;
Project.remove ~project:temp ();
Project.on prj init_cil ();
prepare_from_visitor ?reorder prj visitor;
prj
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment