Skip to content

Commit 74b4f71

Browse files
committed
Fix String.starts_with pre OCaml 4.13 (PR #855)
1 parent 9b7fc2b commit 74b4f71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/cilfacade.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,9 @@ let add_function_declarations (file: Cil.file): unit =
488488
let functions, non_functions = List.partition (fun g -> match g with GFun _ -> true | _ -> false) globals in
489489
let upto_last_type, non_types = GobList.until_last_with (fun g -> match g with GType _ -> true | _ -> false) non_functions in
490490
let declaration_from_GFun f = match f with
491-
| GFun (f, _) when String.starts_with ~prefix:"__builtin" f.svar.vname ->
491+
| GFun (f, _) when BatString.starts_with_stdlib ~prefix:"__builtin" f.svar.vname ->
492492
(* Builtin functions should not occur in asserts generated, so there is no need to add declarations for them.*)
493-
None
493+
None
494494
| GFun (f, _) ->
495495
Some (GVarDecl (f.svar, locUnknown))
496496
| _ -> failwith "Expected GFun, but was something else."

0 commit comments

Comments
 (0)