From 4417b9c8f02fb349184e27342e1a8b981f01cb18 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Fri, 10 Nov 2023 21:01:26 +0100 Subject: [PATCH] Reset `upjumping_gotos` --- src/common/util/cilfacade.ml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common/util/cilfacade.ml b/src/common/util/cilfacade.ml index d645fd949d..8b55c0a1ba 100644 --- a/src/common/util/cilfacade.ml +++ b/src/common/util/cilfacade.ml @@ -667,6 +667,10 @@ let find_stmt_sid sid = with Not_found -> IntH.find (ResettableLazy.force stmt_sids) sid +(** Contains the locations of the upjumping gotos and the respective functions + * they are being called in. *) +let upjumping_gotos : (location * fundec) list ref = ref [] + let reset_lazy () = StmtH.clear pseudo_return_to_fun; ResettableLazy.reset stmt_fundecs; @@ -674,7 +678,8 @@ let reset_lazy () = ResettableLazy.reset name_fundecs; ResettableLazy.reset varinfo_roles; ResettableLazy.reset original_names; - ResettableLazy.reset stmt_sids + ResettableLazy.reset stmt_sids; + upjumping_gotos := [] let stmt_pretty_short () x = @@ -699,8 +704,4 @@ let add_function_declarations (file: Cil.file): unit = in let fun_decls = List.filter_map declaration_from_GFun functions in let globals = upto_last_type @ fun_decls @ non_types @ functions in - file.globals <- globals - -(** Contains the locations of the upjumping gotos and the respective functions - * they are being called in. *) -let upjumping_gotos : (location * fundec) list ref = ref [] + file.globals <- globals \ No newline at end of file