Skip to content
Snippets Groups Projects
Commit fde0bef4 authored by Thibault Martin's avatar Thibault Martin Committed by Virgile Prevosto
Browse files

[Variadic] Add mem for globals and functions in env

parent fcc84bd8
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,12 @@ let find_type (env : t) (namespace : Logic_typing.type_namespace) ...@@ -90,6 +90,12 @@ let find_type (env : t) (namespace : Logic_typing.type_namespace)
| Logic_typing.Enum -> | Logic_typing.Enum ->
TEnum (find_enum env tname, []) TEnum (find_enum env tname, [])
let mem_global (env : t) (vname : string) : bool =
Table.mem env.globals vname
let mem_function (env : t) (vname : string) : bool =
Table.mem env.functions vname
let from_file (file : file) : t = let from_file (file : file) : t =
let env = empty () in let env = empty () in
let v = object inherit Cil.nopCilVisitor let v = object inherit Cil.nopCilVisitor
......
...@@ -34,3 +34,6 @@ val find_struct : t -> string -> Cil_types.compinfo ...@@ -34,3 +34,6 @@ val find_struct : t -> string -> Cil_types.compinfo
val find_union : t -> string -> Cil_types.compinfo val find_union : t -> string -> Cil_types.compinfo
val find_enum : t -> string -> Cil_types.enuminfo val find_enum : t -> string -> Cil_types.enuminfo
val find_type : t -> Logic_typing.type_namespace -> string -> Cil_types.typ val find_type : t -> Logic_typing.type_namespace -> string -> Cil_types.typ
val mem_global : t -> string -> bool
val mem_function : t -> string -> bool
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment