[debug] deterministically order procedures when printing

Summary: So that it can be meaningfully used for diffing across infer versions, say.

Reviewed By: martintrojer

Differential Revision: D23648560

fbshipit-source-id: 98d634e37
master
Nikos Gorogiannis 4 years ago committed by Facebook GitHub Bot
parent 7a416739d6
commit d35a4f6f2e

@ -92,7 +92,16 @@ let pp_all ~filter ~proc_name:proc_name_cond ~attr_kind ~source_file:source_file
(* we could also register this statement but it's typically used only once per run so just prepare
it inside the function *)
Sqlite3.prepare db
"SELECT proc_name, proc_uid, attr_kind, source_file, proc_attributes, cfg FROM procedures"
{|
SELECT
proc_name,
proc_uid,
attr_kind,
source_file,
proc_attributes,
cfg
FROM procedures ORDER BY proc_uid
|}
|> Container.iter ~fold:(SqliteUtils.result_fold_rows db ~log:"print all procedures")
~f:(fun stmt ->
let proc_name = Sqlite3.column stmt 0 |> Procname.SQLite.deserialize in

Loading…
Cancel
Save