From ae81c18fe88ecb36098e432a1054b3e5ef6846f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 7 Apr 2023 09:15:19 +0200 Subject: [PATCH] [Eva] Statistics: fixes the equality between keys. --- src/plugins/eva/utils/statistics.ml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/plugins/eva/utils/statistics.ml b/src/plugins/eva/utils/statistics.ml index 8c495498110..b9fdb8695cd 100644 --- a/src/plugins/eva/utils/statistics.ml +++ b/src/plugins/eva/utils/statistics.ml @@ -100,12 +100,7 @@ module Key = Datatype.Make_with_collections ( let rehash (Key (s, x)) = (Key (register s.name s.kind, x)) let reprs = [Key ({ id = 0; name="dummy"; kind=Global }, ())] - let equal (Key (s1,x1)) (Key (s2,x2)) = - match s1.kind, s2.kind with - | Global, Global -> true - | Function, Function -> Kernel_function.equal x1 x2 - | Statement, Statement -> Cil_datatype.Stmt.equal x1 x2 - | _, _ -> false + let equal = Datatype.from_compare let compare (Key (s1,x1)) (Key (s2,x2)) = let c = s1.id - s2.id in if c <> 0 then c else -- GitLab