From a7e60edd31b04fd333ce2f8fd9f2c5c222c6e595 Mon Sep 17 00:00:00 2001
From: Valentin Perrelle <valentin.perrelle@cea.fr>
Date: Fri, 6 Jan 2023 10:21:02 +0100
Subject: [PATCH] [Eva] Add a repr for Statistics.State

---
 src/plugins/eva/utils/statistics.ml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/eva/utils/statistics.ml b/src/plugins/eva/utils/statistics.ml
index 8c7dad25f98..2e50689661f 100644
--- a/src/plugins/eva/utils/statistics.ml
+++ b/src/plugins/eva/utils/statistics.ml
@@ -97,7 +97,7 @@ module Key = Datatype.Make_with_collections (
     let name = "Statistics.Key"
     let rehash (Key (s, x)) =
       (Key (register s.name s.kind, x))
-    let reprs = []
+    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
@@ -130,7 +130,8 @@ module Key = Datatype.Make_with_collections (
       | Function ->
         Format.fprintf fmt "%s:%a" s.name Kernel_function.pretty x
       | Statement ->
-        Format.fprintf fmt "%s:%a" s.name Cil_datatype.Stmt.pretty x
+        let loc = Cil_datatype.Stmt.loc x in
+        Format.fprintf fmt "%s:%a" s.name Cil_datatype.Location.pretty loc
   end)
 
 
-- 
GitLab