Module IR.Fieldname

module F = Stdlib.Format
type captured_data = {
  1. capture_mode : CapturedVar.capture_mode;
  2. is_function_pointer : bool;
}
val compare_captured_data : captured_data -> captured_data -> int
val equal_captured_data : captured_data -> captured_data -> bool
val yojson_of_captured_data : captured_data -> Ppx_yojson_conv_lib.Yojson.Safe.t
val sexp_of_captured_data : captured_data -> Sexplib0.Sexp.t
val captured_data_of_sexp : Sexplib0.Sexp.t -> captured_data
val hash_fold_captured_data : Ppx_hash_lib.Std.Hash.state -> captured_data -> Ppx_hash_lib.Std.Hash.state
val hash_captured_data : captured_data -> Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize_captured_data : captured_data -> captured_data
val hash_normalize_captured_data_opt : captured_data option -> captured_data option
val hash_normalize_captured_data_list : captured_data list -> captured_data list
type t

Names for fields of class/struct/union

include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val yojson_of_t : t -> Ppx_yojson_conv_lib.Yojson.Safe.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val compare_name : t -> t -> int

Similar to compare, but compares only names, except template arguments.

val make : ?captured_data:captured_data -> ?is_weak:bool -> Typ.Name.t -> string -> t

create a field of the given class and fieldname

val get_class_name : t -> Typ.Name.t
val get_field_name : t -> string
val mk_capture_field_in_closure : Mangled.t -> captured_data -> is_weak:bool -> t
val is_capture_field_in_closure : t -> bool
val is_weak : t -> bool option
val is_capture_field_in_closure_by_ref : t -> bool
val is_capture_field_function_pointer : t -> bool
val is_java : t -> bool
val is_java_synthetic : t -> bool

Check if the field is autogenerated/synthetic *

val is_internal : t -> bool

Check if the field has the prefix "__" or "_M_" (internal field of std::thread::id)

module Set : IStdlib.PrettyPrintable.PPSet with type elt = t

Set for fieldnames

module Map : IStdlib.PrettyPrintable.PPMap with type key = t

Map for fieldnames

val is_java_outer_instance : t -> bool

Check if the field is the synthetic this$n of a nested class, used to access the n-th outer instance.

val to_string : t -> string

Convert a field name to a string.

val to_full_string : t -> string
val to_simplified_string : t -> string

Convert a fieldname to a simplified string with at most one-level path. For example,

  • In C++: "<ClassName>::<FieldName>"
  • In Java, ObjC, C#: "<ClassName>.<FieldName>"
  • In C: "<StructName>.<FieldName>" or "<UnionName>.<FieldName>"
  • In Erlang: "<FieldName>"
val patterns_match : IStdlib.IStd.Str.regexp list -> t -> bool

Test whether a field full string matches to one of the regular expressions.

val pp : F.formatter -> t -> unit

Pretty print a field name.