Skip to content

Commit

Permalink
ppx_compate Cfg
Browse files Browse the repository at this point in the history
Reviewed By: cristianoc

Differential Revision: D4232409

fbshipit-source-id: 71bd578
  • Loading branch information
jberdine authored and Facebook Github Bot committed Nov 30, 2016
1 parent da8cbe5 commit 0b605c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infer/src/IR/Cfg.re
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ let mark_unchanged_pdescs cfg_new cfg_old => {
/* nodes are the same if they have the same id, instructions, and succs/preds up to renaming
with [exp_map] and [id_map] */
let node_eq (n1: Procdesc.Node.t) (n2: Procdesc.Node.t) => {
let id_compare (n1: Procdesc.Node.t) (n2: Procdesc.Node.t) =>
let compare_id (n1: Procdesc.Node.t) (n2: Procdesc.Node.t) =>
try {
let n1_mapping = Procdesc.NodeMap.find n1 !node_map;
Procdesc.Node.compare n1_mapping n2
Expand All @@ -286,7 +286,7 @@ let mark_unchanged_pdescs cfg_new cfg_old => {
)
instrs1
instrs2;
id_compare n1 n2 == 0 &&
compare_id n1 n2 == 0 &&
IList.equal Procdesc.Node.compare (Procdesc.Node.get_succs n1) (Procdesc.Node.get_succs n2) &&
IList.equal Procdesc.Node.compare (Procdesc.Node.get_preds n1) (Procdesc.Node.get_preds n2) &&
instrs_eq (Procdesc.Node.get_instrs n1) (Procdesc.Node.get_instrs n2)
Expand Down

0 comments on commit 0b605c6

Please sign in to comment.