Module Globals.Functions


module Functions: sig .. end
Functions. The AST should be computed before using this module (cf. Ast.compute).

val self : State.t

Getters


val get : Cil_types.varinfo -> Cil_types.kernel_function
Raises Not_found if the given varinfo has not a function type.
val get_params : Cil_types.kernel_function -> Cil_types.varinfo list
val get_vi : Cil_types.kernel_function -> Cil_types.varinfo

Searching


val find_by_name : string -> Cil_types.kernel_function
Raises Not_found if there is no function of this name.
val find_def_by_name : string -> Cil_types.kernel_function
Raises Not_found if there is no function definition of this name.
val find_englobing_kf : Cil_types.kinstr -> Cil_types.kernel_function option
Deprecated.since Carbon-20101201 Use Kernel_function.find_englobing_kf instead

Iterators


val iter : (Cil_types.kernel_function -> unit) -> unit
val fold : (Cil_types.kernel_function -> 'a -> 'a) -> 'a -> 'a
val iter_on_fundecs : (Cil_types.fundec -> unit) -> unit

Setters

Functions of this section should not be called by casual users.

val add : Cil_types.cil_function -> unit
TODO: remove this function and replace all calls by:
val replace_by_declaration : Cil_types.funspec -> Cil_types.varinfo -> Cil_types.location -> unit
val replace_by_definition : Cil_types.funspec -> Cil_types.fundec -> Cil_types.location -> unit
TODO: do not take a funspec as argument
val set_spec : (Cil_types.kernel_function ->
(Cil_types.funspec -> Cil_types.funspec) -> unit)
Pervasives.ref
val register : Cil_types.kernel_function -> unit