GoblintCil.Cabs2cil
Turn on tranformation that forces correct parameter evaluation order
By default, we warn as large constants cannot be appropriately represented as OCaml floats. This can be set to true by tools that are aware of this problem and only use the string component of CReal to avoid emitting warnings that are spurious in that context.
Set this integer to the index of the global to be left in CABS form. Use -1 to disable
Add an attribute to all variables which are not declared at the top scope, so tools building on CIL can know which variables were pulled up. Should be disabled when printing CIL code, as compilers will warn about this attribute.
Indicates whether we're allowed to duplicate small chunks of code.
If false, the destination of a Call instruction should always have the same type as the function's return type. Where needed, CIL will insert a temporary to make this happen.
If true, the destination type may differ from the return type, so there is an implicit cast. This is useful for analyses involving malloc
, because the instruction "T* x = malloc(...);" won't be broken into two instructions, so it's easy to find the allocation type.
This is false by default. Set to true to replicate the behavior of CIL 1.3.5 and earlier.
Disables caching of globals during parsing. This is handy when we want to parse additional source files without hearing about confclits.
A hook into the code that creates temporary local vars. By default this is the identity function, but you can overwrite it if you need to change the types of cabs2cil-introduced temp variables.
Like typeForInsertedVar
, but for casts. Casts in the source code are exempt from this hook.
A hook into the code that merges arguments in function types.
val attrsForCombinedArg :
((string, string) Stdlib.Hashtbl.t ->
Cil.attributes ->
Cil.attributes)
Stdlib.ref
A hook into the code that merges arguments in function attributes.
val allTempVars : unit Inthash.t
type envdata =
| EnvVar of Cil.varinfo
| EnvEnum of Cil.exp * Cil.typ
| EnvTyp of Cil.typ
| EnvLabel of string
A hashtable containing a mapping of variables, enums, types and labels to varinfo, typ, etc.
*)val environment : (string, envdata * Cil.location) Stdlib.Hashtbl.t
val genvironment : (string, envdata * Cil.location) Stdlib.Hashtbl.t
val convStandaloneExp :
genv:(string, envdata * Cil.location) Stdlib.Hashtbl.t ->
env:(string, envdata * Cil.location) Stdlib.Hashtbl.t ->
Cabs.expression ->
Cil.exp option
val currentFunctionFDEC : Cil.fundec Stdlib.ref