Skip to content

Commit

Permalink
dummy instruction deleted, revert if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Tietz committed Feb 7, 2024
1 parent d54ca43 commit 39a4d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
11 changes: 1 addition & 10 deletions src/cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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) =
Expand Down
14 changes: 2 additions & 12 deletions src/cil.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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 *)
Expand Down Expand Up @@ -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. *)
Expand Down

0 comments on commit 39a4d1b

Please sign in to comment.