From 1eb7af8e3e68abaeb60aca9056b15161f24f4679 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 6 Dec 2023 16:46:21 +0200 Subject: [PATCH] Remove Tracing dependency on CilType --- src/common/util/messages.ml | 18 ++++++++++++++++++ src/common/util/tracing.ml | 17 ----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/common/util/messages.ml b/src/common/util/messages.ml index 42a3118978..c9a08e8177 100644 --- a/src/common/util/messages.ml +++ b/src/common/util/messages.ml @@ -340,3 +340,21 @@ let msg_final severity ?(tags=[]) ?(category=Category.Unknown) fmt = GobPretty.igprintf () fmt include Tracing + +open Pretty + +let tracel sys ?var fmt = + let loc = !current_loc in + let docloc sys doc = + printtrace sys (dprintf "(%a)@?" CilType.Location.pretty loc ++ indent 2 doc); + in + gtrace true docloc sys var ~loc ignore fmt + +let traceli sys ?var ?(subsys=[]) fmt = + let loc = !current_loc in + let g () = activate sys subsys in + let docloc sys doc: unit = + printtrace sys (dprintf "(%a)" CilType.Location.pretty loc ++ indent 2 doc); + traceIndent () + in + gtrace true docloc sys var ~loc g fmt diff --git a/src/common/util/tracing.ml b/src/common/util/tracing.ml index ad8892c396..e4167d83a8 100644 --- a/src/common/util/tracing.ml +++ b/src/common/util/tracing.ml @@ -67,13 +67,6 @@ let trace sys ?var fmt = gtrace true printtrace sys var ignore fmt * c: continue/normal print w/o indent-change *) -let tracel sys ?var fmt = - let loc = !current_loc in - let docloc sys doc = - printtrace sys (dprintf "(%a)@?" CilType.Location.pretty loc ++ indent 2 doc); - in - gtrace true docloc sys var ~loc ignore fmt - let tracei (sys:string) ?var ?(subsys=[]) fmt = let f sys d = printtrace sys d; traceIndent () in let g () = activate sys subsys in @@ -85,13 +78,3 @@ let traceu sys fmt = let f sys d = printtrace sys d; traceOutdent () in let g () = deactivate sys in gtrace true f sys None g fmt - - -let traceli sys ?var ?(subsys=[]) fmt = - let loc = !current_loc in - let g () = activate sys subsys in - let docloc sys doc: unit = - printtrace sys (dprintf "(%a)" CilType.Location.pretty loc ++ indent 2 doc); - traceIndent () - in - gtrace true docloc sys var ~loc g fmt