From 0ba8c3f06308f8f6a75abe4130972d2cb32a9abe Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 3 Dec 2015 14:21:39 +0100 Subject: Fixed regression introduce by merge of PR#69. Since the identifier of a function definition and of its declaration are equal we only should remove functions if the function iteself is removed. Bug 17724. --- debug/DebugInformation.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'debug/DebugInformation.ml') diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml index ed00ea0d..be322a55 100644 --- a/debug/DebugInformation.ml +++ b/debug/DebugInformation.ml @@ -293,6 +293,16 @@ let gen_comp_typ sou id at = TUnion (id,at) let remove_unused id = + try + let id' = Hashtbl.find stamp_to_definition id.stamp in + let var = Hashtbl.find definitions id' in + match var with + | Function _ -> () + | _ -> Hashtbl.remove definitions id'; + Hashtbl.remove stamp_to_definition id.stamp + with Not_found -> () + +let remove_unused_function id = try let id' = Hashtbl.find stamp_to_definition id.stamp in Hashtbl.remove definitions id'; -- cgit