From 39a4d1bd9308086474298da54c2892ae5064fbc8 Mon Sep 17 00:00:00 2001 From: Simon Tietz Date: Wed, 7 Feb 2024 17:58:23 +0100 Subject: [PATCH] dummy instruction deleted, revert if necessary --- src/cil.ml | 11 +---------- src/cil.mli | 14 ++------------ 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/cil.ml b/src/cil.ml index 76414639e..679dba247 100755 --- a/src/cil.ml +++ b/src/cil.ml @@ -6033,11 +6033,6 @@ let typeSigAttrs = function let dExp: doc -> exp = fun d -> Const(CStr(sprint ~width:!lineLength d, No_encoding)) -(* todo: is this even used anywhere *) -(* -let dInstr: doc -> location -> instr = - fun d l -> Asm([], [sprint ~width:!lineLength d], [], [], [], l) -*) let dStmt: doc -> location -> stmt = fun d l -> mkStmt (Asm([], [sprint ~width:!lineLength d], [], [], [], [], l)) @@ -6550,11 +6545,7 @@ and succpred_stmt s fallthrough rlabels = | hd :: tl -> link s hd ; succpred_block b fallthrough rlabels end - | Asm (_, _, _, _, _, labels, _) -> - List.iter (fun label -> - link s !label - ) labels; - trylink s fallthrough + | Asm _ -> trylink s fallthrough let caseRangeFold (l: label list) = diff --git a/src/cil.mli b/src/cil.mli index 6b7e2c63d..87d74494b 100644 --- a/src/cil.mli +++ b/src/cil.mli @@ -1752,13 +1752,7 @@ val compactStmts: stmt list -> stmt list (** Returns an empty statement (of kind [Instr]) *) val mkEmptyStmt: unit -> stmt -(** A instr to serve as a placeholder *) -(* todo: maybe this can be removed? *) -(* -val dummyInstr: instr -*) - -(** A statement consisting of just [dummyInstr] *) +(** A statement to serve as a placeholder *) val dummyStmt: stmt (** Make a while loop. Can contain Break or Continue *) @@ -2654,11 +2648,7 @@ val get_stmtLoc: stmtkind -> location (** Generate an {!exp} to be used in case of errors. *) val dExp: Pretty.doc -> exp -(** Generate an {!instr} to be used in case of errors. *) -(* todo: commenting this out is probably a bad idea *) -(* -val dInstr: Pretty.doc -> location -> instr -*) +(** Generate an {!stmt} to be used in case of errors. *) val dStmt: Pretty.doc -> location -> stmt (** Generate a {!global} to be used in case of errors. *)