Skip to content

Commit b3d56de

Browse files
Merge pull request #464 from goblint/rm_cil_msvc_support
Adapt to CIL without MSVC support
2 parents 41a66ac + 0081ae1 commit b3d56de

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

goblint.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dev-repo: "git+https://github.com/goblint/analyzer.git"
5858
# on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project
5959
# also remember to generate/adjust goblint.opam.locked!
6060
pin-depends: [
61-
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c" ]
61+
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#83835348d20b3f51f1e8e505480b773c9fa5f96b" ]
6262
# TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252)
6363
[ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ]
6464
# quoter workaround reverted for release, so no pin needed

goblint.opam.locked

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ version: "dev"
9494
pin-depends: [
9595
[
9696
"goblint-cil.1.8.2"
97-
"git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c"
97+
"git+https://github.com/goblint/cil.git#83835348d20b3f51f1e8e505480b773c9fa5f96b"
9898
]
9999
[
100100
"apron.v0.9.13"

goblint.opam.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project
22
# also remember to generate/adjust goblint.opam.locked!
33
pin-depends: [
4-
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c" ]
4+
[ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#83835348d20b3f51f1e8e505480b773c9fa5f96b" ]
55
# TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252)
66
[ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ]
77
# quoter workaround reverted for release, so no pin needed

src/framework/cfgTools.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ let createCFG (file: file) =
219219
(* Should be removed by Cil.prepareCFG. *)
220220
failwith "MyCFG.createCFG: unprepared stmt"
221221

222-
| ComputedGoto _
223-
| TryExcept _
224-
| TryFinally _ ->
222+
| ComputedGoto _->
225223
failwith "MyCFG.createCFG: unsupported stmt"
226224
in
227225
try
@@ -379,9 +377,7 @@ let createCFG (file: file) =
379377
(* Should be removed by Cil.prepareCFG. *)
380378
failwith "MyCFG.createCFG: unprepared stmt"
381379

382-
| ComputedGoto _
383-
| TryExcept _
384-
| TryFinally _ ->
380+
| ComputedGoto _ ->
385381
failwith "MyCFG.createCFG: unsupported stmt"
386382
in
387383
List.iter handle fd.sallstmts;

src/incremental/compareAST.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ let rec eq_stmtkind ?(cfg_comp = false) ((a, af): stmtkind * fundec) ((b, bf): s
209209
| Switch (exp1, block1, stmts1, _l1, _el1), Switch (exp2, block2, stmts2, _l2, _el2) -> if cfg_comp then failwith "CompareCFG: Invalid stmtkind in CFG" else eq_exp exp1 exp2 && eq_block' block1 block2 && eq_list (fun a b -> eq_stmt (a,af) (b,bf)) stmts1 stmts2
210210
| Loop (block1, _l1, _el1, _con1, _br1), Loop (block2, _l2, _el2, _con2, _br2) -> eq_block' block1 block2
211211
| Block block1, Block block2 -> eq_block' block1 block2
212-
| TryFinally (tryBlock1, finallyBlock1, _l1), TryFinally (tryBlock2, finallyBlock2, _l2) -> eq_block' tryBlock1 tryBlock2 && eq_block' finallyBlock1 finallyBlock2
213-
| TryExcept (tryBlock1, exn1, exceptBlock1, _l1), TryExcept (tryBlock2, exn2, exceptBlock2, _l2) -> eq_block' tryBlock1 tryBlock2 && eq_block' exceptBlock1 exceptBlock2
214212
| _, _ -> false
215213

216214
and eq_stmt ?(cfg_comp = false) ((a, af): stmt * fundec) ((b, bf): stmt * fundec) =

src/util/cilfacade.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ and typeOfLval = function
340340
and typeOffset basetyp =
341341
let blendAttributes baseAttrs =
342342
let (_, _, contageous) =
343-
partitionAttributes ~default:(AttrName false) baseAttrs in
343+
partitionAttributes ~default:AttrName baseAttrs in
344344
typeAddAttributes contageous
345345
in
346346
function
@@ -379,8 +379,6 @@ class countFnVisitor = object
379379
| If (_,_,_,loc,_)
380380
| Switch (_,_,_,loc,_)
381381
| Loop (_,loc,_,_,_)
382-
| TryFinally (_,_,loc)
383-
| TryExcept (_,_,_,loc)
384382
-> Hashtbl.replace locs loc.line (); DoChildren
385383
| _ ->
386384
DoChildren

0 commit comments

Comments
 (0)