libabigail
Classes | Typedefs | Enumerations | Functions
abigail::ir Namespace Reference

The namespace of the internal representation of ABI artifacts like types and decls. More...

Classes

class  array_type_def
 The abstraction of an array type. More...
 
struct  canonical_type_hash
 Functor to hash a canonical type by using its pointer value. More...
 
class  class_decl
 Abstracts a class declaration. More...
 
class  class_or_union
 The base type of class_decl and union_decl. More...
 
class  class_tdecl
 Abstract a class template. More...
 
class  context_rel
 The abstraction of the relationship between an entity and its containing scope (its context). That relationship can carry properties like access rights (if the parent is a class_decl), etc. More...
 
class  corpus
 This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi artefacts like types and decls) bundled together as a corpus. A corpus is thus the Application binary interface of a program, a library or just a set of modules put together. More...
 
class  corpus_group
 Abstraction of a group of corpora. More...
 
class  decl_base
 The base type of all declarations. More...
 
struct  decl_topo_comp
 A functor to sort decls somewhat topologically. That is, types are sorted in a way that makes the ones that are defined "first" to come first. More...
 
class  dm_context_rel
 The abstraction for a data member context relationship. This relates a data member to its parent class. More...
 
class  elf_symbol
 Abstraction of an elf symbol. More...
 
class  enum_type_decl
 Abstracts a declaration for an enum type. More...
 
class  environment
 This is an abstraction of the set of resources necessary to manage several aspects of the internal representations of the Abigail library. More...
 
class  function_decl
 Abstraction for a function declaration. More...
 
class  function_tdecl
 Abstract a function template declaration. More...
 
class  function_type
 Abstraction of a function type. More...
 
class  global_scope
 This abstracts the global scope of a given translation unit. More...
 
class  ir_node_visitor
 The base class for the visitor type hierarchy used for traversing a translation unit. More...
 
struct  ir_traversable_base
 The base of an entity of the intermediate representation that is to be traversed. More...
 
class  location
 The source location of a token. More...
 
class  location_manager
 The entry point to manage locations. More...
 
class  mem_fn_context_rel
 Abstraction of a member function context relationship. This relates a member function to its parent class. More...
 
class  member_base
 The base class for member types, data members and member functions. Its purpose is mainly to carry the access specifier (and possibly other properties that might be shared by all class members) for the member. More...
 
class  member_class_template
 Abstracts a member class template template. More...
 
class  member_function_template
 Abstract a member function template. More...
 
class  method_decl
 Abstraction of the declaration of a method. More...
 
class  method_type
 Abstracts the type of a class member function. More...
 
class  namespace_decl
 The abstraction of a namespace declaration. More...
 
struct  node_visitor_base
 The base class for the visitor type hierarchy used for traversing a hierarchy of nodes. More...
 
class  non_type_tparameter
 Abstracts non type template parameters. More...
 
class  pointer_type_def
 The abstraction of a pointer type. More...
 
class  ptr_to_mbr_type
 The abstraction of a pointer-to-member type. More...
 
class  qualified_type_def
 The abstraction of a qualified type. More...
 
class  real_type
 The internal representation of an integral type. More...
 
class  reference_type_def
 Abstracts a reference type. More...
 
class  scope_decl
 A declaration that introduces a scope. More...
 
class  scope_type_decl
 A type that introduces a scope. More...
 
struct  shared_translation_unit_comp
 A comparison functor to compare translation units based on their absolute paths. More...
 
struct  sort_for_hash_functor
 Functor used to sort types before hashing them. More...
 
class  template_decl
 The base class of templates. More...
 
class  template_parameter
 Base class for a template parameter. Client code should use the more specialized type_template_parameter, non_type_template_parameter and template_template_parameter below. More...
 
class  template_tparameter
 Abstracts a template template parameter. More...
 
class  translation_unit
 This is the abstraction of the set of relevant artefacts (types, variable declarations, functions, templates, etc) bundled together into a translation unit. More...
 
class  traversable_base
 The interface for types which are feeling social and want to be visited during the traversal of a hierarchy of nodes. More...
 
class  type_base
 An abstraction helper for type declarations. More...
 
class  type_composition
 This abstracts a composition of types based on template type parameters. The result of the composition is a type that can be referred to by a template non-type parameter. Instances of this type can appear at the same level as template parameters, in the scope of a template_decl. More...
 
class  type_decl
 A basic type declaration that introduces no scope. More...
 
class  type_maps
 This is a type that aggregates maps of all the kinds of types that are supported by libabigail. More...
 
class  type_or_decl_base
 The base class of both types and declarations. More...
 
struct  type_or_decl_base_comp
 A comparison functor to compare pointer to instances of type_or_decl_base. More...
 
struct  type_or_decl_equal
 The comparison functor for using instances of type_or_decl_base as values in a hash map or set. More...
 
struct  type_or_decl_hash
 The hashing functor for using instances of type_or_decl_base as values in a hash map or set. More...
 
struct  type_ptr_equal
 A predicate for deep equality of instances of type_base*. More...
 
struct  type_shared_ptr_equal
 A predicate for deep equality of instances of shared_ptr<type_base> More...
 
struct  type_topo_comp
 A functor to sort types somewhat topologically. That is, types are sorted in a way that makes the ones that are defined "first" to come first. More...
 
class  type_tparameter
 Abstracts a type template parameter. More...
 
class  typedef_decl
 The abstraction of a typedef declaration. More...
 
struct  uint64_t_pair_hash
 The hashing functor for a pair of uint64_t. More...
 
class  union_decl
 Abstracts a union type declaration. More...
 
class  var_decl
 Abstracts a variable declaration. More...
 

Typedefs

typedef shared_ptr< array_type_defarray_type_def_sptr
 Convenience typedef for a shared pointer on a array_type_def. More...
 
typedef unordered_set< const type_or_decl_base *, type_or_decl_hash, type_or_decl_equalartifact_ptr_set_type
 A convenience typedef for a hash set of const type_or_decl_base*. More...
 
typedef unordered_set< type_or_decl_base_sptr, type_or_decl_hash, type_or_decl_equalartifact_sptr_set_type
 A convenience typedef for a hash set of type_or_decl_base_sptr. More...
 
typedef unordered_set< type_base_sptr, canonical_type_hashcanonical_type_sptr_set_type
 Helper typedef for an unordered set of type_base_sptr which uses pointer value to tell its members appart, because the members are canonical types. More...
 
typedef shared_ptr< class_declclass_decl_sptr
 Convenience typedef for a shared pointer on a class_decl. More...
 
typedef weak_ptr< class_declclass_decl_wptr
 Convenience typedef for a weak pointer on a class_decl. More...
 
typedef shared_ptr< class_or_unionclass_or_union_sptr
 
typedef weak_ptr< class_or_unionclass_or_union_wptr
 
typedef unordered_set< const class_or_union * > class_set_type
 A convenience typedef for a set of pointer to class_or_union. More...
 
typedef shared_ptr< class_tdeclclass_tdecl_sptr
 Convenience typedef for a shared pointer on a class_tdecl. More...
 
typedef vector< class_or_union_sptr > classes_or_unions_type
 Convenience typedef for a vector of class_or_union_sptr. More...
 
typedef vector< class_decl_sptrclasses_type
 Convenience typedef for a vector of class_decl_sptr. More...
 
typedef shared_ptr< context_relcontext_rel_sptr
 A convenience typedef for shared pointers to context_rel. More...
 
typedef shared_ptr< corpus_groupcorpus_group_sptr
 
typedef shared_ptr< corpuscorpus_sptr
 
typedef weak_ptr< corpuscorpus_wptr
 Convenience typedef for a weak pointer to a corpus. More...
 
typedef shared_ptr< decl_basedecl_base_sptr
 
typedef weak_ptr< decl_basedecl_base_wptr
 Convenience typedef for a weak pointer to a decl_base. More...
 
typedef shared_ptr< dm_context_reldm_context_rel_sptr
 A convenience typedef for a shared pointer to dm_context_rel. More...
 
typedef shared_ptr< elf_symbolelf_symbol_sptr
 A convenience typedef for a shared pointer to elf_symbol. More...
 
typedef weak_ptr< elf_symbolelf_symbol_wptr
 A convenience typedef for a weak pointer to elf_symbol. More...
 
typedef std::vector< elf_symbol_sptrelf_symbols
 Convenience typedef for a vector of elf_symbol. More...
 
typedef shared_ptr< enum_type_declenum_type_decl_sptr
 Convenience typedef for shared pointer to a enum_type_decl. More...
 
typedef vector< enum_type_decl_sptrenums_type
 Convenience typedef for a vector of enum_type_decl_sptr. More...
 
typedef shared_ptr< environmentenvironment_sptr
 Convenience typedef for a shared pointer to an environment. More...
 
typedef unordered_map< const function_decl *, bool, function_decl::hash, function_decl::ptr_equalfn_ptr_map_type
 Convenience typedef for a hash map of pointer to function_decl and boolean. More...
 
typedef unordered_set< const function_type * > fn_set_type
 A convenience typedef for a set of pointer to function_type. More...
 
typedef unordered_map< function_type_sptr, bool, function_type::hash, type_shared_ptr_equalfn_type_ptr_map
 
typedef unordered_map< const function_decl *, string, function_decl_hash, function_decl::ptr_equalfns_to_str_map_type
 Convenience typedef for a hash map of pointer to function_decl and string. More...
 
typedef shared_ptr< function_declfunction_decl_sptr
 Convenience typedef for a shared pointer on a function_decl. More...
 
typedef shared_ptr< function_tdeclfunction_tdecl_sptr
 Convenience typedef for a shared pointer on a function_tdecl. More...
 
typedef shared_ptr< function_typefunction_type_sptr
 Convenience typedef for a shared pointer on a function_type. More...
 
typedef weak_ptr< function_typefunction_type_wptr
 Convenience typedef for a weak pointer on a function_type. More...
 
typedef vector< function_type_sptrfunction_types_type
 Convenience typedef fo a vector of function_type_sptr. More...
 
typedef shared_ptr< global_scopeglobal_scope_sptr
 Convenience typedef for shared pointer on global_scope. More...
 
typedef abg_compat::optional< uint64_t > hash_t
 The abstraction for an 8 bytes hash value. More...
 
typedef unordered_map< interned_string, bool, hash_interned_stringinterned_string_bool_map_type
 Convenience typedef for a map of interned_string -> bool. More...
 
typedef shared_ptr< ir_traversable_baseir_traversable_base_sptr
 Convenience typedef for a shared pointer to ir_traversable_base. More...
 
typedef unordered_map< interned_string, std::unordered_set< function_decl * >, hash_interned_stringistr_fn_ptr_set_map_type
 Convenience typedef for a hash map which key is an interned_string and which data is a set of abigail::ir::function_decl*. More...
 
typedef unordered_map< interned_string, var_decl_sptr, hash_interned_stringistr_var_ptr_map_type
 Convenience typedef for a hash map which key is an interned_string and which data is an abigail::ir::var_decl*. More...
 
typedef unordered_map< interned_string, std::unordered_set< var_decl_sptr >, hash_interned_stringistr_var_ptr_set_map_type
 Convenience typedef for a hash map which key is an interned_string and which data is a set of abigail::ir::var_decl_sptr. More...
 
typedef unordered_map< interned_string, const function_decl *, hash_interned_stringistring_function_decl_ptr_map_type
 
typedef unordered_map< interned_string, type_base_wptr, hash_interned_stringistring_type_base_wptr_map_type
 A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr. More...
 
typedef unordered_map< interned_string, type_base_wptrs_type, hash_interned_stringistring_type_base_wptrs_map_type
 A convenience typedef for a map which key is an interned_string and which value is a vector of type_base_wptr. More...
 
typedef unordered_map< interned_string, type_or_decl_base_sptr, hash_interned_stringistring_type_or_decl_base_sptr_map_type
 A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr. More...
 
typedef unordered_map< interned_string, var_decl_sptr, hash_interned_stringistring_var_decl_ptr_map_type
 
typedef shared_ptr< mem_fn_context_relmem_fn_context_rel_sptr
 A convenience typedef for a shared pointer to mem_fn_context_rel. More...
 
typedef shared_ptr< member_class_templatemember_class_template_sptr
 
typedef vector< member_class_template_sptr > member_class_templates
 
typedef shared_ptr< member_function_templatemember_function_template_sptr
 
typedef vector< member_function_template_sptr > member_function_templates
 
typedef shared_ptr< method_declmethod_decl_sptr
 
typedef shared_ptr< method_typemethod_type_sptr
 Convenience typedef for shared pointer to method_type. More...
 
typedef shared_ptr< namespace_declnamespace_decl_sptr
 Convenience typedef for a shared pointer on namespace_decl. More...
 
typedef vector< namespace_decl_sptrnamespaces_type
 A convenience typedef for vectors of namespace_decl_sptr. More...
 
typedef shared_ptr< non_type_tparameternon_type_tparameter_sptr
 Convenience typedef for shared pointer to non_type_template_parameter. More...
 
typedef unordered_set< uintptr_t > pointer_set
 A convenience typedef for an unordered set of pointer values. More...
 
typedef shared_ptr< pointer_type_defpointer_type_def_sptr
 Convenience typedef for a shared pointer on a pointer_type_def. More...
 
typedef shared_ptr< ptr_to_mbr_typeptr_to_mbr_type_sptr
 Convenience typedef for a shared pointer to a ptr_to_mbr_type. More...
 
typedef shared_ptr< qualified_type_defqualified_type_def_sptr
 
typedef shared_ptr< reference_type_defreference_type_def_sptr
 Convenience typedef for a shared pointer on a reference_type_def. More...
 
typedef vector< regex_t_sptr > regex_t_sptrs_type
 A convenience typedef for std::vector<regex_t_sptr>. More...
 
typedef shared_ptr< scope_declscope_decl_sptr
 Convenience typedef for a shared pointer on a scope_decl. More...
 
typedef unordered_map< string, const function_decl * > str_fn_ptr_map_type
 Convenience typedef for a hash map of string and pointer to function_decl. More...
 
typedef unordered_map< string, std::unordered_set< function_decl * > > str_fn_ptr_set_map_type
 Convenience typedef for a hash map which key is a string and which data is a set of abigail::ir::function_decl*. More...
 
typedef unordered_map< string, vector< function_decl * > > str_fn_ptrs_map_type
 Convenience typedef for a hash map which key is a string and which data is a vector of abigail::ir::function_decl*. More...
 
typedef unordered_map< string, var_decl_sptrstr_var_ptr_map_type
 Convenience typedef for a hash map which key is a string and which data is an abigail::ir::var_decl*. More...
 
typedef unordered_map< string, decl_base_sptr > string_decl_base_sptr_map
 Convenience typedef for a map which key is a string and which value is a decl_base_sptr. More...
 
typedef shared_ptr< string_elf_symbol_sptr_map_typestring_elf_symbol_sptr_map_sptr
 Convenience typedef for a shared pointer to an string_elf_symbol_sptr_map_type. More...
 
typedef std::unordered_map< string, elf_symbol_sptrstring_elf_symbol_sptr_map_type
 Convenience typedef for a map which key is a string and which value if the elf symbol of the same name. More...
 
typedef shared_ptr< string_elf_symbols_map_typestring_elf_symbols_map_sptr
 Convenience typedef for a shared pointer to string_elf_symbols_map_type. More...
 
typedef std::unordered_map< string, elf_symbolsstring_elf_symbols_map_type
 Convenience typedef for a map which key is a string and which value is a vector of elf_symbol. More...
 
typedef unordered_map< string, translation_unit_sptrstring_tu_map_type
 Convenience typedef for a map that associates a string to a translation unit. More...
 
typedef unordered_map< string, type_base_sptr > string_type_base_sptr_map_type
 A convenience typedef for a map which key is a string and which value is a type_base_sptr. More...
 
typedef unordered_map< string, type_base_wptrstring_type_base_wptr_map_type
 A convenience typedef for a map which key is a string and which value is a type_base_wptr. More...
 
typedef shared_ptr< template_decltemplate_decl_sptr
 Convenience typedef for a shared pointer to template_decl. More...
 
typedef weak_ptr< template_decltemplate_decl_wptr
 Convenience typedef for a weak pointer to template_decl. More...
 
typedef shared_ptr< template_parametertemplate_parameter_sptr
 Convenience typedef for shared pointer to template parameter. More...
 
typedef shared_ptr< template_tparametertemplate_tparameter_sptr
 Convenience typedef for a shared_ptr to template_tparameter. More...
 
typedef shared_ptr< translation_unittranslation_unit_sptr
 Convenience typedef for a shared pointer on a translation_unit type. More...
 
typedef std::set< translation_unit_sptr, shared_translation_unit_comptranslation_units
 Convenience typedef for an ordered set of translation_unit_sptr. More...
 
typedef vector< type_base * > type_base_ptrs_type
 Helper typedef for a vector of pointer to type_base. More...
 
typedef shared_ptr< type_basetype_base_sptr
 
typedef vector< type_base_sptr > type_base_sptrs_type
 Helper typedef for a vector of shared pointer to a type_base. More...
 
typedef weak_ptr< type_basetype_base_wptr
 Convenience typedef for a weak pointer on a type_base. More...
 
typedef vector< type_base_wptrtype_base_wptrs_type
 A convenience typedef for a vector of type_base_wptr. More...
 
typedef unordered_map< uint64_t_pair_type, bool, uint64_t_pair_hashtype_comparison_result_type
 A convenience typedef for a map which key is a pair of uint64_t and which value is a boolean. This is initially intended to cache the result of comparing two (sub-)types. More...
 
typedef shared_ptr< type_compositiontype_composition_sptr
 Convenience typedef for shared pointer to type_composition. More...
 
typedef shared_ptr< type_decltype_decl_sptr
 Convenience typedef for a shared pointer on a type_decl. More...
 
typedef shared_ptr< type_or_decl_basetype_or_decl_base_sptr
 A convenience typedef for a shared_ptr to type_or_decl_base. More...
 
typedef shared_ptr< type_tparametertype_tparameter_sptr
 Convenience typedef for a shared pointer to type_tparameter. More...
 
typedef shared_ptr< typedef_decltypedef_decl_sptr
 Convenience typedef for a shared pointer on a typedef_decl. More...
 
typedef weak_ptr< typedef_decltypedef_decl_wptr
 Convenience typedef for a weak pointer on a typedef_decl. More...
 
typedef std::pair< uint64_t, uint64_t > uint64_t_pair_type
 A convenience typedef for a pair of uint64_t which is initially intended to store a pair of pointer values. More...
 
typedef unordered_set< uint64_t_pair_type, uint64_t_pair_hashuint64_t_pairs_set_type
 A convenience typedef for a set of uint64_t_pair. More...
 
typedef shared_ptr< union_declunion_decl_sptr
 
typedef shared_ptr< var_declvar_decl_sptr
 Convenience typedef for a shared pointer on a var_decl. More...
 
typedef weak_ptr< var_declvar_decl_wptr
 Convenience typedef for a weak pointer on a var_decl. More...
 
typedef unordered_map< const var_decl *, bool, var_decl::hash, var_decl::ptr_equalvar_ptr_map_type
 Convenience typedef for a hash map of pointer to var_decl and boolean. More...
 

Enumerations

enum  access_specifier { no_access , public_access , protected_access , private_access }
 Access specifier for class members. More...
 
enum  change_kind {
  NO_CHANGE_KIND , LOCAL_TYPE_CHANGE_KIND , LOCAL_NON_TYPE_CHANGE_KIND , ALL_LOCAL_CHANGES_MASK ,
  SUBTYPE_CHANGE_KIND
}
 A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal representation artifacts are. More...
 
enum  comparison_result { COMPARISON_RESULT_DIFFERENT , COMPARISON_RESULT_EQUAL , COMPARISON_RESULT_CYCLE_DETECTED , COMPARISON_RESULT_UNKNOWN }
 The result of structural comparison of type ABI artifacts. More...
 
enum  lookup_entity_kind { LOOKUP_ENTITY_TYPE , LOOKUP_ENTITY_VAR }
 This enum describe the kind of entity to lookup, while using the lookup API. More...
 

Functions

decl_base_sptr add_decl_to_scope (decl_base_sptr decl, const scope_decl_sptr &scope)
 Appends a declaration to a given scope, if the declaration doesn't already belong to a scope. More...
 
decl_base_sptr add_decl_to_scope (decl_base_sptr decl, scope_decl *scope)
 Appends a declaration to a given scope, if the declaration doesn't already belong to one and if the declaration is not for a type that is supposed to be unique. More...
 
bool anonymous_data_member_exists_in_class (const var_decl &anon_dm, const class_or_union &clazz)
 Test if a given anonymous data member exists in a class or union. More...
 
class_or_union_sptr anonymous_data_member_to_class_or_union (const var_decl &d)
 Get the class_or_union type of a given anonymous data member. More...
 
class_or_unionanonymous_data_member_to_class_or_union (const var_decl *d)
 Get the class_or_union type of a given anonymous data member. More...
 
class_or_union_sptr anonymous_data_member_to_class_or_union (const var_decl_sptr &d)
 Get the class_or_union type of a given anonymous data member. More...
 
string build_internal_underlying_enum_type_name (const string &base_name, bool is_anonymous, uint64_t size)
 Build the internal name of the underlying type of an enum. More...
 
string build_qualified_name (const scope_decl *scope, const string &name)
 Build and return a qualified name from a name and its scope. More...
 
string build_qualified_name (const scope_decl *scope, const type_base_sptr &type)
 Build and return the qualified name of a type in its scope. More...
 
type_base_sptr canonicalize (type_base_sptr t, bool do_log, bool show_stats)
 Compute the canonical type of a given type. More...
 
template<typename input_iterator , typename deref_lambda >
void canonicalize_types (const input_iterator &begin, const input_iterator &end, deref_lambda deref, bool do_log=false, bool show_stats=false)
 Compute the canonical type for all the IR types of the system. More...
 
bool class_or_union_types_of_same_kind (const class_or_union *first, const class_or_union *second)
 Test if two class or union types are of the same kind. More...
 
bool class_or_union_types_of_same_kind (const class_or_union_sptr &first, const class_or_union_sptr &second)
 Test if two class or union types are of the same kind. More...
 
bool classes_have_same_layout (const type_base_sptr &f, const type_base_sptr &s)
 Test if two classes have the same layout. More...
 
array_type_def_sptr clone_array (const array_type_def_sptr &array)
 Clone an array type. More...
 
type_base_sptr clone_array_tree (const type_base_sptr t)
 Clone a type tree made of an array or a typedef of array. More...
 
qualified_type_def_sptr clone_qualified_type (const qualified_type_def_sptr &t)
 Clone a qualifiend type. More...
 
typedef_decl_sptr clone_typedef (const typedef_decl_sptr &t)
 Clone a typedef type. More...
 
bool collect_non_anonymous_data_members (const class_or_union *cou, string_decl_base_sptr_map &dms)
 Collect all the non-anonymous data members of a class or union type. More...
 
bool collect_non_anonymous_data_members (const class_or_union_sptr &cou, string_decl_base_sptr_map &dms)
 Collect all the non-anonymous data members of a class or union type. More...
 
bool compare_using_locations (const decl_base *f, const decl_base *s)
 Compare decls using their locations. More...
 
string components_to_type_name (const list< string > &comps)
 Turn a set of qualified name components (that name a type) into a qualified name string. More...
 
string components_to_type_name (const std::list< string > &)
 
void compute_aliases_for_elf_symbol (const elf_symbol &sym, const string_elf_symbols_map_type &symtab, vector< elf_symbol_sptr > &aliases)
 
method_decl_sptr copy_member_function (const class_decl_sptr &clazz, const method_decl *f)
 Copy a method of a class into a new class. More...
 
method_decl_sptr copy_member_function (const class_decl_sptr &clazz, const method_decl_sptr &f)
 Copy a method of a class into a new class. More...
 
method_decl_sptr copy_member_function (const class_or_union_sptr &t, const method_decl *method)
 Copy a method of a class_or_union into a new class_or_union. More...
 
method_decl_sptr copy_member_function (const class_or_union_sptr &t, const method_decl_sptr &method)
 Copy a method of a class_or_union into a new class_or_union. More...
 
method_decl_sptr copy_member_function (const union_decl_sptr &union_type, const method_decl *f)
 Copy a method of a union_decl into a new union_decl. More...
 
method_decl_sptr copy_member_function (const union_decl_sptr &union_type, const method_decl_sptr &f)
 Copy a method of a union_decl into a new union_decl. More...
 
const class_or_union_sptr data_member_has_anonymous_type (const var_decl &d)
 Test if a data member has annonymous type or not. More...
 
const class_or_union_sptr data_member_has_anonymous_type (const var_decl *d)
 Test if a data member has annonymous type or not. More...
 
const class_or_union_sptr data_member_has_anonymous_type (const var_decl_sptr &d)
 Test if a data member has annonymous type or not. More...
 
decl_basedebug (const decl_base *artifact)
 Emit a textual representation of an artifact to std error stream for debugging purposes. More...
 
type_basedebug (const type_base *artifact)
 Emit a textual representation of an artifact to std error stream for debugging purposes. More...
 
type_or_decl_basedebug (const type_or_decl_base *artifact)
 Emit a textual representation of an artifact to std error stream for debugging purposes. More...
 
void debug_comp_stack (const environment &env)
 Emit a trace of the two comparison operands stack on the standard error stream. More...
 
bool debug_equals (const type_or_decl_base *l, const type_or_decl_base *r)
 Test if two ABI artifacts are equal. More...
 
bool decl_name_changed (const type_or_decl_base *a1, const type_or_decl_base *a2)
 Test if two decls have different names. More...
 
bool decl_name_changed (const type_or_decl_base_sptr &d1, const type_or_decl_base_sptr &d2)
 Test if two decls have different names. More...
 
string demangle_cplus_mangled_name (const string &mangled_name)
 Demangle a C++ mangled name and return the resulting string. More...
 
template<typename T >
hash_t do_hash_value (const shared_ptr< T > &tod)
 Compute the hash value of an IR node and return it. More...
 
template<typename T >
hash_t do_hash_value (const T &tod)
 Compute the hash value of an IR node and return it. More...
 
template<typename T >
hash_t do_hash_value (const T *tod)
 Compute the hash value of an IR node and return it. More...
 
bool elf_symbol_is_function (elf_symbol::type t)
 Test if the type of an ELF symbol denotes a function symbol. More...
 
bool elf_symbol_is_variable (elf_symbol::type t)
 Test if the type of an ELF symbol denotes a function symbol. More...
 
bool elf_symbols_alias (const elf_symbol &s1, const elf_symbol &s2)
 Test if two symbols alias. More...
 
bool elf_symbols_alias (const elf_symbol *s1, const elf_symbol *s2)
 Test if two symbols alias. More...
 
bool elf_symbols_alias (const elf_symbol_sptr s1, const elf_symbol_sptr s2)
 Test if two symbols alias. More...
 
bool enum_has_non_name_change (const enum_type_decl &l, const enum_type_decl &r, change_kind *k)
 Test if two enums differ, but not by a name change. More...
 
bool equals (const array_type_def &l, const array_type_def &r, change_kind *k)
 Compares two instances of array_type_def. More...
 
bool equals (const array_type_def::subrange_type &l, const array_type_def::subrange_type &r, change_kind *k)
 Compares two isntances of array_type_def::subrange_type. More...
 
bool equals (const class_decl &l, const class_decl &r, change_kind *k)
 Compares two instances of class_decl. More...
 
bool equals (const class_decl::base_spec &l, const class_decl::base_spec &r, change_kind *k)
 Compares two instances of class_decl::base_spec. More...
 
bool equals (const class_or_union &l, const class_or_union &r, change_kind *k)
 Compares two instances of class_or_union. More...
 
bool equals (const decl_base &l, const decl_base &r, change_kind *k)
 Compares two instances of decl_base. More...
 
bool equals (const enum_type_decl &l, const enum_type_decl &r, change_kind *k)
 Compares two instances of enum_type_decl. More...
 
bool equals (const function_decl &l, const function_decl &r, change_kind *k)
 Compares two instances of function_decl. More...
 
bool equals (const function_decl::parameter &l, const function_decl::parameter &r, change_kind *k)
 Compares two instances of function_decl::parameter. More...
 
bool equals (const function_type &l, const function_type &r, change_kind *k)
 Compare two function types. More...
 
bool equals (const pointer_type_def &l, const pointer_type_def &r, change_kind *k)
 Compares two instances of pointer_type_def. More...
 
bool equals (const ptr_to_mbr_type &l, const ptr_to_mbr_type &r, change_kind *k)
 Compares two instances of ptr_to_mbr_type. More...
 
bool equals (const qualified_type_def &l, const qualified_type_def &r, change_kind *k)
 Compares two instances of qualified_type_def. More...
 
bool equals (const reference_type_def &l, const reference_type_def &r, change_kind *k)
 Compares two instances of reference_type_def. More...
 
bool equals (const scope_decl &l, const scope_decl &r, change_kind *k)
 Compares two instances of scope_decl. More...
 
bool equals (const scope_type_decl &l, const scope_type_decl &r, change_kind *k)
 Compares two instances of scope_type_decl. More...
 
bool equals (const type_base &l, const type_base &r, change_kind *k)
 Compares two instances of type_base. More...
 
bool equals (const type_decl &l, const type_decl &r, change_kind *k)
 Compares two instances of type_decl. More...
 
bool equals (const typedef_decl &l, const typedef_decl &r, change_kind *k)
 Compares two instances of typedef_decl. More...
 
bool equals (const union_decl &l, const union_decl &r, change_kind *k)
 Compares two instances of union_decl. More...
 
bool equals (const var_decl &l, const var_decl &r, change_kind *k)
 Compares two instances of var_decl. More...
 
bool equals_modulo_cv_qualifier (const array_type_def *l, const array_type_def *r)
 Test if two array types are equals modulo CV qualifiers. More...
 
bool equals_modulo_cv_qualifier (const array_type_def_sptr &l, const array_type_def_sptr &r)
 Test if two array types are equals modulo CV qualifiers. More...
 
bool equals_modulo_cv_qualifier (const pointer_type_def *l, const pointer_type_def *r)
 Test if two pointer types are equals modulo CV qualifiers. More...
 
bool equals_modulo_cv_qualifier (const pointer_type_def_sptr &l, const pointer_type_def_sptr &r)
 Test if two pointer types are equals modulo CV qualifiers. More...
 
var_decl_sptr find_data_member_from_anonymous_data_member (const var_decl_sptr &anon_dm, const string &name)
 Find a data member inside an anonymous data member. More...
 
var_decl_sptr find_first_data_member_matching_regexp (const class_or_union &t, const regex::regex_t_sptr &r)
 Find the first data member of a class or union which name matches a regular expression. More...
 
var_decl_sptr find_last_data_member_matching_regexp (const class_or_union &t, const regex::regex_t_sptr &regex)
 Find the last data member of a class or union which name matches a regular expression. More...
 
void fixup_virtual_member_function (method_decl_sptr method)
 When a virtual member function has seen its virtualness set by set_member_function_is_virtual(), this function ensures that the member function is added to the specific vectors and maps of virtual member function of its class. More...
 
void fns_to_str (vector< function_decl * >::const_iterator a_begin, vector< function_decl * >::const_iterator a_end, vector< function_decl * >::const_iterator b_begin, vector< function_decl * >::const_iterator b_end, std::ostream &o)
 For each sequence of functions given in argument, generate a sequence of string that matches a given sequence of function. In the resulting sequence, each function is "uniquely representated" by a string. For instance, if the same function "foo" appears at indexes 1 and 3, then the same string 'schmurf' (okay, we don't care about the actual string) would appear at index 1 and 3. More...
 
void fqn_to_components (const std::string &, std::list< string > &)
 
void fqn_to_components (const string &fqn, list< string > &comps)
 Decompose a fully qualified name into the list of its components. More...
 
bool function_decl_is_less_than (const function_decl &f, const function_decl &s)
 Test if the pretty representation of a given function_decl is lexicographically less then the pretty representation of another function_decl. More...
 
bool function_decls_alias (const function_decl &f1, const function_decl &f2)
 Test if two function declarations are aliases. More...
 
uint64_t get_absolute_data_member_offset (const var_decl &m)
 Get the absolute offset of a data member. More...
 
uint64_t get_absolute_data_member_offset (const var_decl_sptr &m)
 Get the absolute offset of a data member. More...
 
const locationget_artificial_or_natural_location (const decl_base *decl)
 Get the artificial location of a decl. More...
 
size_t get_canonical_type_index (const type_base &t)
 Getter of the canonical type index of a given type. More...
 
size_t get_canonical_type_index (const type_base *t)
 Getter of the canonical type index of a given type. More...
 
size_t get_canonical_type_index (const type_base_sptr &t)
 Getter of the canonical type index of a given type. More...
 
string get_class_or_enum_flat_representation (const type_base &coe, const string &indent, bool one_line, bool internal, bool qualified_name)
 Get the flat representation of an instance of enum_type_decl type. More...
 
string get_class_or_union_flat_representation (const class_or_union &cou, const string &indent, bool one_line, bool internal, bool qualified_names)
 Get the flat representation of an instance of class_or_union type. More...
 
string get_class_or_union_flat_representation (const class_or_union *cou, const string &indent, bool one_line, bool internal, bool qualified_names)
 Get the flat representation of an instance of class_or_union type. More...
 
string get_class_or_union_flat_representation (const class_or_union_sptr &cou, const string &indent, bool one_line, bool internal, bool qualified_names)
 Get the flat representation of an instance of class_or_union type. More...
 
var_decl_sptr get_data_member (class_or_union *clazz, const char *member_name)
 Get a given data member, referred to by its name, of a class type. More...
 
var_decl_sptr get_data_member (type_base *clazz, const char *member_name)
 Get a given data member, referred to by its name, of a class type. More...
 
bool get_data_member_is_laid_out (const var_decl &m)
 Test whether a data member is laid out. More...
 
bool get_data_member_is_laid_out (const var_decl_sptr m)
 Test whether a data member is laid out. More...
 
uint64_t get_data_member_offset (const decl_base_sptr d)
 Get the offset of a data member. More...
 
uint64_t get_data_member_offset (const var_decl &m)
 Get the offset of a data member. More...
 
uint64_t get_data_member_offset (const var_decl_sptr m)
 Get the offset of a data member. More...
 
string get_debug_representation (const type_or_decl_base *artifact)
 Get the textual representation of a type for debugging purposes. More...
 
string get_enum_flat_representation (const enum_type_decl &enum_type, const string &indent, bool one_line, bool internal, bool qualified_names)
 
string get_enum_flat_representation (const enum_type_decl &enum_type, const string &indent, bool one_line, bool qualified_names)
 Get the flat representation of an instance of enum_type_decl type. More...
 
string get_enum_flat_representation (const enum_type_decl *enum_type, const string &indent, bool one_line, bool internal, bool qualified_names)
 
string get_enum_flat_representation (const enum_type_decl *enum_type, const string &indent, bool one_line, bool qualified_names)
 Get the flat representation of an instance of enum_type_decl type. More...
 
string get_enum_flat_representation (const enum_type_decl_sptr &enum_type, const string &indent, bool one_line, bool qualified_names)
 Get the flat representation of an instance of enum_type_decl type. More...
 
type_baseget_exemplar_type (const type_base *type)
 For a given type, return its exemplar type. More...
 
const var_decl_sptr get_first_non_anonymous_data_member (const var_decl_sptr anon_dm)
 Get the first non-anonymous data member of a given anonymous data member. More...
 
interned_string get_function_id_or_pretty_representation (const function_decl *fn)
 Get the ID of a function, or, if the ID can designate several different functions, get its pretty representation. More...
 
const function_decl::parameterget_function_parameter (const decl_base *fun, unsigned parm_index)
 Get the function parameter designated by its index. More...
 
interned_string get_function_type_name (const function_type &fn_type, bool internal)
 Get the name of a given function type and return a copy of it. More...
 
interned_string get_function_type_name (const function_type *fn_type, bool internal)
 Get the name of a given function type and return a copy of it. More...
 
interned_string get_function_type_name (const function_type_sptr &fn_type, bool internal)
 Get the name of a given function type and return a copy of it. More...
 
const global_scopeget_global_scope (const decl_base &decl)
 return the global scope as seen by a given declaration. More...
 
const global_scopeget_global_scope (const decl_base *decl)
 return the global scope as seen by a given declaration. More...
 
const global_scopeget_global_scope (const decl_base_sptr)
 
const global_scopeget_global_scope (const shared_ptr< decl_base > decl)
 Return the global scope as seen by a given declaration. More...
 
var_decl_sptr get_last_data_member (const class_or_union &klass)
 Get the last data member of a class type. More...
 
var_decl_sptr get_last_data_member (const class_or_union *klass)
 Get the last data member of a class type. More...
 
var_decl_sptr get_last_data_member (const class_or_union_sptr &klass)
 Get the last data member of a class type. More...
 
location get_location (const decl_base_sptr &decl)
 Get the location of a given declaration. More...
 
location get_location (const type_base_sptr &type)
 Get the location of the declaration of a given type. More...
 
access_specifier get_member_access_specifier (const decl_base &d)
 Gets the access specifier for a class member. More...
 
access_specifier get_member_access_specifier (const decl_base_sptr &d)
 Gets the access specifier for a class member. More...
 
bool get_member_function_is_const (const function_decl &f)
 Test whether a member function is const. More...
 
bool get_member_function_is_const (const function_decl_sptr &f)
 Test whether a member function is const. More...
 
bool get_member_function_is_ctor (const function_decl &f)
 Test whether a member function is a constructor. More...
 
bool get_member_function_is_ctor (const function_decl_sptr &f)
 Test whether a member function is a constructor. More...
 
bool get_member_function_is_dtor (const function_decl &f)
 Test whether a member function is a destructor. More...
 
bool get_member_function_is_dtor (const function_decl_sptr &f)
 Test whether a member function is a destructor. More...
 
bool get_member_function_is_virtual (const function_decl &f)
 Test if a given member function is virtual. More...
 
bool get_member_function_is_virtual (const function_decl *mem_fn)
 Test if a given member function is virtual. More...
 
bool get_member_function_is_virtual (const function_decl_sptr &mem_fn)
 Test if a given member function is virtual. More...
 
ssize_t get_member_function_vtable_offset (const function_decl &f)
 Get the vtable offset of a member function. More...
 
ssize_t get_member_function_vtable_offset (const function_decl_sptr &f)
 Get the vtable offset of a member function. More...
 
bool get_member_is_static (const decl_base &d)
 Gets a flag saying if a class member is static or not. More...
 
bool get_member_is_static (const decl_base *d)
 Gets a flag saying if a class member is static or not. More...
 
bool get_member_is_static (const decl_base_sptr &d)
 Gets a flag saying if a class member is static or not. More...
 
interned_string get_method_type_name (const method_type &fn_type, bool internal)
 Get the name of a given method type and return a copy of it. More...
 
interned_string get_method_type_name (const method_type *fn_type, bool internal)
 Get the name of a given method type and return a copy of it. More...
 
interned_string get_method_type_name (const method_type_sptr &, bool internal=false)
 
interned_string get_method_type_name (const method_type_sptr fn_type, bool internal)
 Get the name of a given method type and return a copy of it. More...
 
string get_name (const type_or_decl_base *tod, bool qualified)
 Build and return a copy of the name of an ABI artifact that is either a type or a decl. More...
 
string get_name (const type_or_decl_base_sptr &tod, bool qualified)
 Build and return a copy of the name of an ABI artifact that is either a type of a decl. More...
 
interned_string get_name_of_pointer_to_type (const type_base &pointed_to_type, bool qualified, bool internal)
 Get the name of the pointer to a given type. More...
 
interned_string get_name_of_qualified_type (const type_base_sptr &underlying_type, qualified_type_def::CV quals, bool qualified, bool internal)
 Get the name of a qualified type, given the underlying type and its qualifiers. More...
 
interned_string get_name_of_reference_to_type (const type_base &pointed_to_type, bool lvalue_reference, bool qualified, bool internal)
 Get the name of the reference to a given type. More...
 
const locationget_natural_or_artificial_location (const decl_base *decl)
 Get the non-artificial (natural) location of a decl. More...
 
const var_decl_sptr get_next_data_member (const class_or_union *klass, const var_decl_sptr &data_member)
 In the context of a given class or union, this function returns the data member that is located after a given data member. More...
 
const var_decl_sptr get_next_data_member (const class_or_union_sptr &klass, const var_decl_sptr &data_member)
 In the context of a given class or union, this function returns the data member that is located after a given data member. More...
 
bool get_next_data_member_offset (const class_or_union *klass, const var_decl_sptr &dm, uint64_t &offset)
 Get the offset of the non-static data member that comes after a given one. More...
 
bool get_next_data_member_offset (const class_or_union_sptr &klass, const var_decl_sptr &dm, uint64_t &offset)
 Get the offset of the non-static data member that comes after a given one. More...
 
template<>
const interned_stringget_node_name (class_decl_sptr node)
 Gets the name of a class_decl node. More...
 
template<>
const interned_stringget_node_name (type_base_sptr node)
 Gets the name of a type_base node. More...
 
template<>
const interned_stringget_node_name (var_decl_sptr node)
 Gets the name of a var_decl node. More...
 
string get_pretty_representation (const decl_base *d, bool internal)
 Get a copy of the pretty representation of a decl. More...
 
string get_pretty_representation (const decl_base_sptr &d, bool internal)
 Get a copy of the pretty representation of a decl. More...
 
string get_pretty_representation (const function_type &fn_type, bool internal)
 Get the pretty representation of a function type. More...
 
string get_pretty_representation (const function_type *fn_type, bool internal)
 Get the pretty representation of a function type. More...
 
string get_pretty_representation (const function_type_sptr &fn_type, bool internal)
 Get the pretty representation of a function type. More...
 
string get_pretty_representation (const method_type &method, bool internal)
 Get the pretty representation of a method type. More...
 
string get_pretty_representation (const method_type *method, bool internal)
 Get the pretty representation of a method type. More...
 
string get_pretty_representation (const method_type_sptr &, bool internal=false)
 
string get_pretty_representation (const method_type_sptr method, bool internal)
 Get the pretty representation of a method type. More...
 
string get_pretty_representation (const type_base *t, bool internal)
 Get a copy of the pretty representation of a type. More...
 
string get_pretty_representation (const type_base_sptr &t, bool internal)
 Get a copy of the pretty representation of a type. More...
 
string get_pretty_representation (const type_or_decl_base *tod, bool internal)
 Build and return a copy of the pretty representation of an ABI artifact that could be either a type of a decl. More...
 
string get_pretty_representation (const type_or_decl_base_sptr &tod, bool internal)
 Build and return a copy of the pretty representation of an ABI artifact that could be either a type of a decl. More...
 
string get_string_representation_of_cv_quals (const qualified_type_def::CV cv_quals)
 Get the string representation of a CV qualifier bitmap. More...
 
const scope_declget_top_most_scope_under (const decl_base *decl, const scope_decl *scope)
 Return the a scope S containing a given declaration and that is right under a given scope P. More...
 
const scope_declget_top_most_scope_under (const decl_base_sptr decl, const scope_decl *scope)
 Return the a scope S containing a given declaration and that is right under a given scope P. More...
 
const scope_declget_top_most_scope_under (const decl_base_sptr decl, const scope_decl_sptr scope)
 Return the a scope S containing a given declaration and that is right under a given scope P. More...
 
translation_unitget_translation_unit (const type_or_decl_base &t)
 Return the translation unit a declaration belongs to. More...
 
translation_unitget_translation_unit (const type_or_decl_base *decl)
 Return the translation unit a declaration belongs to. More...
 
translation_unitget_translation_unit (const type_or_decl_base_sptr &decl)
 Return the translation unit a declaration belongs to. More...
 
const decl_baseget_type_declaration (const type_base *t)
 Get the declaration for a given type. More...
 
decl_base_sptr get_type_declaration (const type_base_sptr t)
 Get the declaration for a given type. More...
 
decl_baseget_type_declaration (type_base *t)
 Get the declaration for a given type. More...
 
interned_string get_type_name (const type_base &t, bool qualified, bool internal)
 Get the name of a given type and return a copy of it. More...
 
interned_string get_type_name (const type_base *t, bool qualified, bool internal)
 Get the name of a given type and return a copy of it. More...
 
interned_string get_type_name (const type_base_sptr &t, bool qualified, bool internal)
 Get the name of a given type and return a copy of it. More...
 
scope_declget_type_scope (const type_base_sptr &t)
 Get the scope of a given type. More...
 
scope_declget_type_scope (type_base *t)
 Get the scope of a given type. More...
 
uint64_t get_var_size_in_bits (const var_decl_sptr &v)
 Get the size of a given variable. More...
 
var_decl_sptr has_fake_flexible_array_data_member (const class_decl &klass)
 Test if the last data member of a class is an array with one element. More...
 
var_decl_sptr has_fake_flexible_array_data_member (const class_decl *klass)
 Test if the last data member of a class is an array with one element. More...
 
var_decl_sptr has_fake_flexible_array_data_member (const class_decl_sptr &klass)
 Test if the last data member of a class is an array with one element. More...
 
var_decl_sptr has_flexible_array_data_member (const class_decl &klass)
 Test if the last data member of a class is an array with non-finite data member. More...
 
var_decl_sptr has_flexible_array_data_member (const class_decl *klass)
 Test if the last data member of a class is an array with non-finite data member. More...
 
var_decl_sptr has_flexible_array_data_member (const class_decl_sptr &klass)
 Test if the last data member of a class is an array with non-finite data member. More...
 
bool has_scope (const decl_base &d)
 Tests if a declaration has got a scope. More...
 
bool has_scope (const decl_base_sptr d)
 Tests if a declaration has got a scope. More...
 
template<typename IteratorType , typename deref_lambda >
void hash_and_canonicalize_types (IteratorType begin, IteratorType end, deref_lambda deref, bool do_log=false, bool show_stats=false)
 Hash and canonicalize a sequence of types. More...
 
size_t hash_type (const type_base *t)
 Hash an ABI artifact that is a type. More...
 
size_t hash_type_or_decl (const type_or_decl_base *tod)
 Hash an ABI artifact that is either a type or a decl. More...
 
size_t hash_type_or_decl (const type_or_decl_base_sptr &tod)
 Hash an ABI artifact that is either a type of a decl. More...
 
decl_base_sptr insert_decl_into_scope (decl_base_sptr decl, scope_decl::declarations::iterator before, scope_decl *scope)
 Inserts a declaration into a given scope, before a given IR child node of the scope. More...
 
decl_base_sptr insert_decl_into_scope (decl_base_sptr decl, scope_decl::declarations::iterator before, scope_decl_sptr scope)
 Inserts a declaration into a given scope, before a given IR child node of the scope. More...
 
decl_base_sptr insert_decl_into_scope (decl_base_sptr, vector< decl_base_sptr >::iterator, scope_decl *)
 
decl_base_sptr insert_decl_into_scope (decl_base_sptr, vector< decl_base_sptr >::iterator, scope_decl_sptr)
 
bool integral_type_has_harmless_name_change (const decl_base_sptr &f, const decl_base_sptr &s)
 Test if a diff node carries a change whereby two integral types have different names in a harmless way. More...
 
bool integral_type_has_harmless_name_change (const type_base_sptr &f, const type_base_sptr &s)
 Test if a diff node carries a change whereby two integral types have different names in a harmless way. More...
 
bool is_ada_language (translation_unit::language l)
 Test if a language enumerator designates the Ada language. More...
 
bool is_anonymous_data_member (const decl_base &d)
 Test if a decl is an anonymous data member. More...
 
const var_declis_anonymous_data_member (const decl_base *d)
 Test if a decl is an anonymous data member. More...
 
var_decl_sptr is_anonymous_data_member (const decl_base_sptr &d)
 Test if a decl is an anonymous data member. More...
 
const var_declis_anonymous_data_member (const type_or_decl_base *d)
 Test if a decl is an anonymous data member. More...
 
var_decl_sptr is_anonymous_data_member (const type_or_decl_base_sptr &d)
 Test if a decl is an anonymous data member. More...
 
bool is_anonymous_data_member (const var_decl &d)
 Test if a var_decl is an anonymous data member. More...
 
const var_declis_anonymous_data_member (const var_decl *d)
 Test if a var_decl is an anonymous data member. More...
 
var_decl_sptr is_anonymous_data_member (const var_decl_sptr &d)
 Test if a var_decl is an anonymous data member. More...
 
bool is_anonymous_or_typedef_named (const decl_base &d)
 Test if a given decl is anonymous or has a naming typedef. More...
 
bool is_anonymous_type (const type_base *t)
 Test whether a declaration is a type. More...
 
bool is_anonymous_type (const type_base_sptr &t)
 Test if a given type is anonymous. More...
 
qualified_type_def_sptr is_array_of_qualified_element (const array_type_def_sptr &array)
 Tests if the element of a given array is a qualified type. More...
 
array_type_def_sptr is_array_of_qualified_element (const type_base_sptr &type)
 Test if an array type is an array to a qualified element type. More...
 
array_type_defis_array_type (const type_or_decl_base *type, bool look_through_qualifiers)
 Test if a type is an array_type_def. More...
 
array_type_def_sptr is_array_type (const type_or_decl_base_sptr &type, bool look_through_qualifiers)
 Test if a type is an array_type_def. More...
 
class_or_unionis_at_class_scope (const decl_base &decl)
 Tests whether a given decl is at class scope. More...
 
class_or_unionis_at_class_scope (const decl_base *decl)
 Tests whether a given decl is at class scope. More...
 
class_or_unionis_at_class_scope (const decl_base_sptr decl)
 Tests whether a given decl is at class scope. More...
 
bool is_at_global_scope (const decl_base &decl)
 Tests whether a given declaration is at global scope. More...
 
bool is_at_global_scope (const decl_base *decl)
 Tests whether a given declaration is at global scope. More...
 
bool is_at_global_scope (const decl_base_sptr decl)
 Tests whether a given declaration is at global scope. More...
 
bool is_at_template_scope (const decl_base_sptr)
 
bool is_at_template_scope (const shared_ptr< decl_base > decl)
 Tests whether a given decl is at template scope. More...
 
bool is_c_language (translation_unit::language l)
 Test if a language enumerator designates the C language. More...
 
class_decl::base_specis_class_base_spec (const type_or_decl_base *tod)
 Test if an ABI artifact is a class base specifier. More...
 
class_decl::base_specis_class_base_spec (type_or_decl_base *)
 
class_decl::base_spec_sptr is_class_base_spec (type_or_decl_base_sptr tod)
 Test if an ABI artifact is a class base specifier. More...
 
shared_ptr< class_or_unionis_class_or_union_type (const shared_ptr< type_or_decl_base > &t)
 Test if a type is a class_or_union. More...
 
class_or_unionis_class_or_union_type (const type_or_decl_base *t)
 Test if a type is a class_or_union. More...
 
class_or_union_sptr is_class_or_union_type (const type_or_decl_base_sptr &)
 
bool is_class_type (const type_or_decl_base &t)
 Test whether a type is a class. More...
 
class_declis_class_type (const type_or_decl_base *t)
 Test whether a type is a class. More...
 
class_decl_sptr is_class_type (const type_or_decl_base_sptr &d)
 Test whether a type is a class. More...
 
template<>
bool is_comparison_cycle_detected (const class_decl &l, const class_decl &r)
 Detect if a recursive comparison cycle is detected while structurally comparing two class_decl types. More...
 
template<typename T >
bool is_comparison_cycle_detected (T &l, T &r)
 Detect if a recursive comparison cycle is detected while structurally comparing two types (a.k.a member-wise comparison). More...
 
class_decl_sptr is_compatible_with_class_type (const decl_base_sptr &t)
 Test if a type is a class. This function looks through typedefs. More...
 
class_decl_sptr is_compatible_with_class_type (const type_base_sptr &t)
 Test if a type is a class. This function looks through typedefs. More...
 
enum_type_decl_sptr is_compatible_with_enum_type (const decl_base_sptr &t)
 Test if a type is an enum. This function looks through typedefs. More...
 
enum_type_decl_sptr is_compatible_with_enum_type (const type_base_sptr &t)
 Test if a type is an enum. This function looks through typedefs. More...
 
bool is_const_qualified_type (const qualified_type_def_sptr &t)
 Test if a given qualified type is const. More...
 
bool is_const_qualified_type (const type_base_sptr &t)
 Test if a given type is const-qualified. More...
 
corpus_group_sptr is_corpus_group (const corpus_sptr &corpus)
 Test if a corpus is a corpus_group. More...
 
bool is_cplus_plus_language (translation_unit::language l)
 Test if a language enumerator designates the C++ language. More...
 
var_declis_data_member (const decl_base *d)
 Test if a decl is a data member. More...
 
var_decl_sptr is_data_member (const decl_base_sptr &d)
 Test if a decl is a data member. More...
 
var_declis_data_member (const type_or_decl_base *d)
 Test if a decl is a data member. More...
 
var_decl_sptr is_data_member (const type_or_decl_base_sptr &d)
 Test if a decl is a data member. More...
 
bool is_data_member (const var_decl &v)
 Test if a var_decl is a data member. More...
 
bool is_data_member (const var_decl *v)
 Test if a var_decl is a data member. More...
 
bool is_data_member (const var_decl_sptr d)
 Test if a var_decl is a data member. More...
 
bool is_data_member_of_anonymous_class_or_union (const var_decl &d)
 Test if a var_decl is a data member belonging to an anonymous type. More...
 
bool is_data_member_of_anonymous_class_or_union (const var_decl *d)
 Test if a var_decl is a data member belonging to an anonymous type. More...
 
bool is_data_member_of_anonymous_class_or_union (const var_decl_sptr &d)
 Test if a var_decl is a data member belonging to an anonymous type. More...
 
decl_baseis_decl (const type_or_decl_base *d)
 Test if an ABI artifact is a declaration. More...
 
decl_base_sptr is_decl (const type_or_decl_base_sptr &d)
 Test if an ABI artifact is a declaration. More...
 
decl_baseis_decl_slow (const type_or_decl_base *t)
 Test if an ABI artifact is a declaration. More...
 
decl_base_sptr is_decl_slow (const type_or_decl_base_sptr &t)
 Test if an ABI artifact is a declaration. More...
 
bool is_declaration_only_class_or_union_type (const type_base *t, bool look_through_decl_only)
 Test wheter a type is a declaration-only class. More...
 
bool is_declaration_only_class_or_union_type (const type_base_sptr &t, bool look_through_decl_only)
 Test wheter a type is a declaration-only class. More...
 
bool is_declaration_only_class_type (const type_base_sptr &t, bool look_through_decl_only)
 Test wheter a type is a declaration-only class. More...
 
const enum_type_declis_enum_type (const type_or_decl_base *d)
 Test if a decl is an enum_type_decl. More...
 
enum_type_decl_sptr is_enum_type (const type_or_decl_base_sptr &d)
 Test if a decl is an enum_type_decl. More...
 
bool is_enumerator_present_in_enum (const enum_type_decl::enumerator &enr, const enum_type_decl &enom)
 Test if a given enumerator is found present in an enum. More...
 
bool is_function_decl (const type_or_decl_base &d)
 Test whether a declaration is a function_decl. More...
 
function_declis_function_decl (const type_or_decl_base *d)
 Test whether a declaration is a function_decl. More...
 
function_decl_sptr is_function_decl (const type_or_decl_base_sptr &d)
 Test whether a declaration is a function_decl. More...
 
function_decl::parameteris_function_parameter (const type_or_decl_base *tod)
 Test whether a declaration is a function_decl. More...
 
function_decl::parameter_sptr is_function_parameter (const type_or_decl_base_sptr tod)
 Test whether an ABI artifact is a function_decl. More...
 
bool is_function_template_pattern (const decl_base_sptr)
 
bool is_function_template_pattern (const shared_ptr< decl_base > decl)
 Test whether a decl is the pattern of a function template. More...
 
const function_typeis_function_type (const type_or_decl_base *t)
 Test whether a type is a function_type. More...
 
function_type_sptr is_function_type (const type_or_decl_base_sptr &t)
 Test whether a type is a function_type. More...
 
function_typeis_function_type (type_or_decl_base *t)
 Test whether a type is a function_type. More...
 
bool is_global_scope (const scope_decl &scope)
 Tests whether if a given scope is the global scope. More...
 
const global_scopeis_global_scope (const scope_decl *scope)
 Tests whether if a given scope is the global scope. More...
 
bool is_global_scope (const scope_decl_sptr)
 
bool is_global_scope (const shared_ptr< scope_decl >scope)
 Tests whether if a given scope is the global scope. More...
 
type_declis_integral_type (const type_or_decl_base *t)
 Test if a type is an integral type. More...
 
type_decl_sptr is_integral_type (const type_or_decl_base_sptr &t)
 Test if a type is an integral type. More...
 
bool is_java_language (translation_unit::language l)
 Test if a language enumerator designates the Java language. More...
 
bool is_member_decl (const decl_base &d)
 Tests if a declaration is a class member. More...
 
bool is_member_decl (const decl_base *d)
 Tests if a declaration is a class member. More...
 
bool is_member_decl (const decl_base_sptr d)
 Tests if a declaration is a class member. More...
 
bool is_member_function (const function_decl &f)
 Test whether a function_decl is a member function. More...
 
bool is_member_function (const function_decl *f)
 Test whether a function_decl is a member function. More...
 
bool is_member_function (const function_decl_sptr &f)
 Test whether a function_decl is a member function. More...
 
bool is_member_type (const type_base_sptr &t)
 Tests if a type is a class member. More...
 
method_declis_method_decl (const type_or_decl_base &d)
 Test if a function_decl is actually a method_decl. More...
 
method_declis_method_decl (const type_or_decl_base *d)
 Test if a function_decl is actually a method_decl. More...
 
method_decl_sptr is_method_decl (const type_or_decl_base_sptr &d)
 Test if a function_decl is actually a method_decl. More...
 
const method_typeis_method_type (const type_or_decl_base *t)
 Test whether a type is a method_type. More...
 
method_type_sptr is_method_type (const type_or_decl_base_sptr &t)
 Test whether a type is a method_type. More...
 
method_typeis_method_type (type_or_decl_base *t)
 Test whether a type is a method_type. More...
 
namespace_declis_namespace (const decl_base *d)
 Tests if a declaration is a namespace declaration. More...
 
namespace_decl_sptr is_namespace (const decl_base_sptr &d)
 Tests if a declaration is a namespace declaration. More...
 
bool is_non_canonicalized_type (const type_base *t)
 Test if a given type is allowed to be non canonicalized. More...
 
bool is_non_canonicalized_type (const type_base_sptr &t)
 Test if a given type is allowed to be non canonicalized. More...
 
bool is_npaf_type (const type_base_sptr &t)
 Test if a type is a neither a pointer, an array nor a function type. More...
 
pointer_type_def_sptr is_pointer_to_array_type (const type_base_sptr &t)
 Test if a type is a pointer to array type. More...
 
pointer_type_def_sptr is_pointer_to_function_type (const type_base_sptr &t)
 Test if a type is a pointer to function type. More...
 
pointer_type_def_sptr is_pointer_to_npaf_type (const type_base_sptr &t)
 Test if we are looking at a pointer to a neither-a-pointer-to-an-array-nor-a-function type. More...
 
pointer_type_def_sptr is_pointer_to_ptr_to_mbr_type (const type_base_sptr &t)
 Test if we are looking at a pointer to pointer to member type. More...
 
const pointer_type_defis_pointer_type (const type_or_decl_base *t, bool look_through_qualifiers)
 Test whether a type is a pointer_type_def. More...
 
pointer_type_def_sptr is_pointer_type (const type_or_decl_base_sptr &t, bool look_through_qualifiers)
 Test whether a type is a pointer_type_def. More...
 
bool is_ptr_ref_or_qual_type (const type_base *t)
 Helper to detect if a type is either a reference, a pointer, or a qualified type. More...
 
const ptr_to_mbr_typeis_ptr_to_mbr_type (const type_or_decl_base *t, bool look_through_qualifiers)
 Test whether a type is a ptr_to_mbr_type. More...
 
ptr_to_mbr_type_sptr is_ptr_to_mbr_type (const type_or_decl_base_sptr &t, bool look_through_qualifiers)
 Test whether a type is a ptr_to_mbr_type_sptr. More...
 
qualified_type_defis_qualified_type (const type_or_decl_base *t)
 Test whether a type is a reference_type_def. More...
 
qualified_type_def_sptr is_qualified_type (const type_or_decl_base_sptr &t)
 Test whether a type is a qualified_type_def. More...
 
type_declis_real_type (const type_or_decl_base *t)
 Test if a type is a real type. More...
 
type_decl_sptr is_real_type (const type_or_decl_base_sptr &t)
 Test if a type is a real type. More...
 
const reference_type_defis_reference_type (const type_or_decl_base *t, bool look_through_qualifiers)
 Test whether a type is a reference_type_def. More...
 
reference_type_def_sptr is_reference_type (const type_or_decl_base_sptr &t, bool look_through_qualifiers)
 Test whether a type is a reference_type_def. More...
 
reference_type_defis_reference_type (type_or_decl_base *t, bool look_through_qualifiers)
 Test whether a type is a reference_type_def. More...
 
const scope_declis_scope_decl (const decl_base *d)
 Test if a declaration is a scope_decl. More...
 
scope_decl_sptr is_scope_decl (const decl_base_sptr &d)
 Test if a declaration is a scope_decl. More...
 
array_type_def::subrange_typeis_subrange_type (const type_or_decl_base *type)
 Test if a type is an array_type_def::subrange_type. More...
 
array_type_def::subrange_sptr is_subrange_type (const type_or_decl_base_sptr &type)
 Test if a type is an array_type_def::subrange_type. More...
 
bool is_template_decl (const decl_base_sptr &decl)
 Tests whether a decl is a template. More...
 
bool is_template_decl (const decl_base_sptr)
 
bool is_template_parameter (const decl_base_sptr)
 
bool is_template_parameter (const shared_ptr< decl_base > decl)
 Tests whether a decl is a template parameter. More...
 
bool is_template_parm_composition_type (const decl_base_sptr)
 
bool is_template_parm_composition_type (const shared_ptr< decl_base > decl)
 Tests whether a decl is a template parameter composition type. More...
 
bool is_type (const type_or_decl_base &tod)
 Test whether a declaration is a type. More...
 
type_baseis_type (const type_or_decl_base *t)
 Test whether a declaration is a type. More...
 
type_base_sptr is_type (const type_or_decl_base_sptr &tod)
 Test whether a declaration is a type. More...
 
const type_declis_type_decl (const type_or_decl_base *t)
 Test whether a type is a type_decl (a builtin type). More...
 
type_decl_sptr is_type_decl (const type_or_decl_base_sptr &t)
 Test whether a type is a type_decl (a builtin type). More...
 
const typedef_declis_typedef (const type_base *t)
 Test whether a type is a typedef. More...
 
const typedef_declis_typedef (const type_or_decl_base *t)
 Test whether a type is a typedef. More...
 
typedef_decl_sptr is_typedef (const type_or_decl_base_sptr t)
 Test whether a type is a typedef. More...
 
typedef_declis_typedef (type_base *t)
 Test whether a type is a typedef. More...
 
array_type_def_sptr is_typedef_of_array (const type_base_sptr &t)
 Test if a type is a typedef of an array. More...
 
bool is_typedef_of_maybe_qualified_class_or_union_type (const type_base *t)
 Test if a type is a typedef of a class or union type, or a typedef of a qualified class or union type. More...
 
bool is_typedef_of_maybe_qualified_class_or_union_type (const type_base_sptr &t)
 Test if a type is a typedef of a class or union type, or a typedef of a qualified class or union type. More...
 
bool is_typedef_ptr_or_ref_to_decl_only_class_or_union_type (const type_base *t)
 Test if a type is a typedef, pointer or reference to a decl-only class/union. More...
 
union_decl_sptr is_union_type (const shared_ptr< type_or_decl_base > &t)
 Test if a type is a union_decl. More...
 
bool is_union_type (const type_or_decl_base &t)
 Test if a type is a union_decl. More...
 
union_declis_union_type (const type_or_decl_base *t)
 Test if a type is a union_decl. More...
 
union_decl_sptr is_union_type (const type_or_decl_base_sptr &)
 
bool is_unique_type (const type_base *t)
 Test if a type is unique in the entire environment. More...
 
bool is_unique_type (const type_base_sptr &t)
 Test if a type is unique in the entire environment. More...
 
bool is_user_defined_type (const type_base *t)
 Test if a type is user-defined. More...
 
bool is_user_defined_type (const type_base_sptr &t)
 Test if a type is user-defined. More...
 
var_declis_var_decl (const type_or_decl_base *tod)
 Tests if a declaration is a variable declaration. More...
 
var_decl_sptr is_var_decl (const type_or_decl_base_sptr &decl)
 Tests if a declaration is a variable declaration. More...
 
const type_baseis_void_pointer_type (const type_base *t)
 Test if a type is a pointer to void type. More...
 
const type_base_sptr is_void_pointer_type (const type_base_sptr &t)
 Test if a type is a pointer to void type. More...
 
const type_baseis_void_pointer_type_equivalent (const type_base &type)
 Test if a type is equivalent to a pointer to void type. More...
 
const type_baseis_void_pointer_type_equivalent (const type_base *type)
 Test if a type is equivalent to a pointer to void type. More...
 
void keep_type_alive (type_base_sptr t)
 Make sure that the life time of a given (smart pointer to a) type is the same as the life time of the libabigail library. More...
 
decl_base_sptr look_through_decl_only (const decl_base &d)
 If a decl is decl-only get its definition. Otherwise, just return nil. More...
 
decl_base_sptr look_through_decl_only (const decl_base_sptr &d)
 If a decl is decl-only get its definition. Otherwise, just return nil. More...
 
decl_baselook_through_decl_only (decl_base *d)
 If a decl is decl-only enum, get its definition. Otherwise, just return the initial decl. More...
 
class_or_unionlook_through_decl_only_class (class_or_union *the_class)
 If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class. More...
 
class_or_union_sptr look_through_decl_only_class (class_or_union_sptr klass)
 If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class. More...
 
class_or_union_sptr look_through_decl_only_class (const class_or_union &the_class)
 If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class. More...
 
enum_type_decl_sptr look_through_decl_only_enum (const enum_type_decl &the_enum)
 If an enum is a decl-only enum, get its definition. Otherwise, just return the initial enum. More...
 
enum_type_decl_sptr look_through_decl_only_enum (enum_type_decl_sptr enom)
 If an enum is a decl-only enum, get its definition. Otherwise, just return the initial enum. More...
 
type_base_sptr look_through_decl_only_type (const type_base_sptr &t)
 If a type is is decl-only, then get its definition. Otherwise, just return the initial type. More...
 
type_baselook_through_decl_only_type (type_base *t)
 If a type is is decl-only, then get its definition. Otherwise, just return the initial type. More...
 
array_type_def_sptr lookup_array_type (const array_type_def &, const translation_unit &)
 
array_type_def_sptr lookup_array_type (const array_type_def &t, const corpus &corp)
 Look into a given corpus to find an array type which has a given qualified name. More...
 
array_type_def_sptr lookup_array_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find an array type which has the same qualified name as a given array type. More...
 
array_type_def_sptr lookup_array_type (const interned_string &type_name, const translation_unit &tu)
 Lookup an array type from a translation unit. More...
 
array_type_def_sptr lookup_array_type (const string &, const translation_unit &)
 
type_decl_sptr lookup_basic_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a basic type which has a given qualified name. More...
 
type_decl_sptr lookup_basic_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a basic type from a translation unit. More...
 
type_decl_sptr lookup_basic_type (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find a basic type which has a given qualified name. More...
 
type_decl_sptr lookup_basic_type (const string &type_name, const translation_unit &tu)
 Lookup a basic type from a translation unit. More...
 
type_decl_sptr lookup_basic_type (const type_decl &, const translation_unit &)
 
type_decl_sptr lookup_basic_type (const type_decl &t, const corpus &corp)
 Look into a given corpus to find a type which has the same qualified name as a giventype. More...
 
type_decl_sptr lookup_basic_type_per_location (const interned_string &loc, const corpus &corp)
 Lookup a type_decl type from a given corpus, by its location. More...
 
type_decl_sptr lookup_basic_type_per_location (const string &loc, const corpus &corp)
 Lookup a type_decl type from a given corpus, by its location. More...
 
type_base_sptr lookup_class_or_typedef_type (const string &, const translation_unit &)
 
type_base_sptr lookup_class_or_typedef_type (const string &qualified_name, const corpus &corp)
 Look into a corpus to find a class, union or typedef type which has a given qualified name. More...
 
class_decl_sptr lookup_class_type (const class_decl &, const translation_unit &)
 
class_decl_sptr lookup_class_type (const class_decl &t, const corpus &corp)
 Look into a given corpus to find a class type which has the same qualified name as a given type. More...
 
class_decl_sptr lookup_class_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a class type which has a given qualified name. More...
 
class_decl_sptr lookup_class_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a class type from a translation unit. More...
 
class_decl_sptr lookup_class_type (const string &fqn, const translation_unit &tu)
 Lookup a class type from a translation unit. More...
 
class_decl_sptr lookup_class_type (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find a class type which has a given qualified name. More...
 
class_decl_sptr lookup_class_type_per_location (const interned_string &loc, const corpus &corp)
 Look up a class_decl from a given corpus by its location. More...
 
class_decl_sptr lookup_class_type_per_location (const string &loc, const corpus &corp)
 Look up a class_decl from a given corpus by its location. More...
 
class_decl_sptr lookup_class_type_through_scopes (const list< string > &fqn, const translation_unit &tu)
 Lookup a class type from a translation unit by walking its scopes in sequence and by looking into them. More...
 
class_decl_sptr lookup_class_type_through_scopes (const std::list< string > &, const translation_unit &)
 
type_base_sptr lookup_class_typedef_or_enum_type (const string &, const translation_unit &)
 
type_base_sptr lookup_class_typedef_or_enum_type (const string &qualified_name, const corpus &corp)
 Look into a corpus to find a class, typedef or enum type which has a given qualified name. More...
 
const type_base_wptrs_typelookup_class_types (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find the class type*s* that have a given qualified name. More...
 
const type_base_wptrs_typelookup_class_types (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find the class type*s* that have a given qualified name. More...
 
const var_decllookup_data_member (const type_base *type, const char *dm_name)
 Look for a data member of a given class, struct or union type and return it. More...
 
const var_decl_sptr lookup_data_member (const type_base_sptr &type, const var_decl_sptr &dm)
 Look for a data member of a given class, struct or union type and return it. More...
 
bool lookup_decl_only_class_types (const interned_string &qualified_name, const corpus &corp, type_base_wptrs_type &result)
 Look into a given corpus to find the class type*s* that have a given qualified name and that are declaration-only. More...
 
enum_type_decl_sptr lookup_enum_type (const enum_type_decl &, const translation_unit &)
 
enum_type_decl_sptr lookup_enum_type (const enum_type_decl &t, const corpus &corp)
 Look into a given corpus to find an enum type which has the same qualified name as a given enum type. More...
 
enum_type_decl_sptr lookup_enum_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find an enum type which has a given qualified name. More...
 
enum_type_decl_sptr lookup_enum_type (const interned_string &type_name, const translation_unit &tu)
 Lookup an enum type from a translation unit. More...
 
enum_type_decl_sptr lookup_enum_type (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find an enum type which has a given qualified name. More...
 
enum_type_decl_sptr lookup_enum_type (const string &type_name, const translation_unit &tu)
 Lookup an enum type from a translation unit. More...
 
enum_type_decl_sptr lookup_enum_type_per_location (const interned_string &loc, const corpus &corp)
 Look up an enum_type_decl from a given corpus, by its location. More...
 
enum_type_decl_sptr lookup_enum_type_per_location (const string &loc, const corpus &corp)
 Look up an enum_type_decl from a given corpus, by its location. More...
 
const type_base_wptrs_typelookup_enum_types (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find the enum type*s* that have a given qualified name. More...
 
const type_base_wptrs_typelookup_enum_types (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find the enum type*s* that have a given qualified name. More...
 
function_type_sptr lookup_function_type (const function_type &t, const corpus &corp)
 Look into a given corpus to find a function type which has the same qualified name as a given function type. More...
 
function_type_sptr lookup_function_type (const function_type &t, const translation_unit &tu)
 Lookup a function type from a translation unit. More...
 
function_type_sptr lookup_function_type (const function_type_sptr &fn_t, const corpus &corpus)
 Look into a given corpus to find a function type which has the same qualified name as a given function type. More...
 
function_type_sptr lookup_function_type (const function_type_sptr &t, const translation_unit &tu)
 Lookup a function type from a translation unit. More...
 
function_type_sptr lookup_function_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a function type which has a given qualified name. More...
 
function_type_sptr lookup_function_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a function type from a translation unit. More...
 
function_type_sptr lookup_function_type (const string &, const translation_unit &)
 
function_type_sptr lookup_or_synthesize_fn_type (const function_type_sptr &fn_t, const corpus &corpus)
 Look into an ABI corpus for a function type. More...
 
pointer_type_def_sptr lookup_pointer_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a pointer type which has a given qualified name. More...
 
pointer_type_def_sptr lookup_pointer_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a pointer type from a translation unit. More...
 
pointer_type_def_sptr lookup_pointer_type (const pointer_type_def &, const translation_unit &)
 
pointer_type_def_sptr lookup_pointer_type (const pointer_type_def &t, const corpus &corp)
 Look into a given corpus to find a pointer type which has the same qualified name as a given pointer type. More...
 
pointer_type_def_sptr lookup_pointer_type (const string &type_name, const translation_unit &tu)
 Lookup a pointer type from a translation unit. More...
 
pointer_type_def_sptr lookup_pointer_type (const type_base_sptr &pointed_to_type, const translation_unit &tu)
 Lookup a pointer type from a translation unit. More...
 
qualified_type_def_sptr lookup_qualified_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a qualified type which has a given qualified name. More...
 
qualified_type_def_sptr lookup_qualified_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a qualified type from a translation unit. More...
 
qualified_type_def_sptr lookup_qualified_type (const qualified_type_def &, const translation_unit &)
 
qualified_type_def_sptr lookup_qualified_type (const qualified_type_def &t, const corpus &corp)
 Look into a given corpus to find a qualified type which has the same qualified name as a given type. More...
 
qualified_type_def_sptr lookup_qualified_type (const string &, const translation_unit &)
 
qualified_type_def_sptr lookup_qualified_type (const type_base_sptr &underlying_type, qualified_type_def::CV quals, const translation_unit &tu)
 Lookup a qualified type from a translation unit. More...
 
reference_type_def_sptr lookup_reference_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a reference type which has a given qualified name. More...
 
reference_type_def_sptr lookup_reference_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a reference type from a translation unit. More...
 
const reference_type_def_sptr lookup_reference_type (const reference_type_def &, const translation_unit &)
 
reference_type_def_sptr lookup_reference_type (const reference_type_def &t, const corpus &corp)
 Look into a given corpus to find a reference type which has the same qualified name as a given reference type. More...
 
const reference_type_def_sptr lookup_reference_type (const string &, const translation_unit &)
 
const reference_type_def_sptr lookup_reference_type (const type_base_sptr &pointed_to_type, bool lvalue_reference, const translation_unit &tu)
 Lookup a reference type from a translation unit. More...
 
const type_base_sptr lookup_type (const interned_string &fqn, const translation_unit &tu)
 Lookup a type in a translation unit. More...
 
type_base_sptr lookup_type (const interned_string &n, const corpus &corp)
 Look into a given corpus to find a type which has a given qualified name. More...
 
type_base_sptr lookup_type (const string &fqn, const translation_unit &tu)
 Lookup a type in a translation unit, starting from the global namespace. More...
 
type_base_sptr lookup_type (const type_base &t, const corpus &corp)
 Look into a given corpus to find a type. More...
 
type_base_sptr lookup_type (const type_base_sptr &t, const corpus &corp)
 Look into a given corpus to find a type. More...
 
const type_base_sptr lookup_type (const type_base_sptr type, const translation_unit &tu)
 Lookup a type from a translation unit. More...
 
type_base_sptr lookup_type_from_translation_unit (const string &type_name, const string &tu_path, const corpus &corp)
 Lookup a type from a given translation unit present in a give corpus. More...
 
const type_base_sptr lookup_type_in_scope (const list< string > &comps, const scope_decl_sptr &scope)
 lookup a type in a scope. More...
 
const type_base_sptr lookup_type_in_scope (const std::list< string > &, const scope_decl_sptr &)
 
const type_base_sptr lookup_type_in_scope (const string &fqn, const scope_decl_sptr &skope)
 Lookup a type in a scope. More...
 
type_base_sptr lookup_type_per_location (const interned_string &loc, const corpus &corp)
 Lookup a type from a corpus, by its location. More...
 
type_base_sptr lookup_type_through_scopes (const list< string > &fqn, const translation_unit &tu)
 Lookup a type from a translation unit by walking its scopes in sequence and by looking into them. More...
 
type_base_sptr lookup_type_through_scopes (const std::list< string > &, const translation_unit &)
 
const type_base_sptr lookup_type_through_scopes (const type_base_sptr type, const translation_unit &tu)
 Lookup a type from a translation unit by walking the scopes of the translation unit in sequence and looking into them. More...
 
type_base_sptr lookup_type_through_translation_units (const string &qn, const corpus &abi_corpus)
 Lookup a type definition in all the translation units of a given ABI corpus. More...
 
typedef_decl_sptr lookup_typedef_type (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find a typedef type which has a given qualified name. More...
 
typedef_decl_sptr lookup_typedef_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a typedef type from a translation unit. More...
 
typedef_decl_sptr lookup_typedef_type (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find a typedef type which has the same qualified name as a given typedef type. More...
 
typedef_decl_sptr lookup_typedef_type (const string &type_name, const translation_unit &tu)
 Lookup a typedef type from a translation unit. More...
 
typedef_decl_sptr lookup_typedef_type (const typedef_decl &, const translation_unit &)
 
typedef_decl_sptr lookup_typedef_type (const typedef_decl &t, const corpus &corp)
 Look into a given corpus to find a typedef type which has the same qualified name as a given typedef type. More...
 
typedef_decl_sptr lookup_typedef_type_per_location (const interned_string &loc, const corpus &corp)
 Lookup a typedef_decl from a corpus, by its location. More...
 
typedef_decl_sptr lookup_typedef_type_per_location (const string &loc, const corpus &corp)
 Lookup a typedef_decl from a corpus, by its location. More...
 
union_decl_sptr lookup_union_type (const interned_string &type_name, const corpus &corp)
 Look into a given corpus to find a union type which has a given qualified name. More...
 
union_decl_sptr lookup_union_type (const interned_string &type_name, const translation_unit &tu)
 Lookup a union type from a translation unit. More...
 
union_decl_sptr lookup_union_type (const string &fqn, const translation_unit &tu)
 Lookup a union type from a translation unit. More...
 
union_decl_sptr lookup_union_type (const string &type_name, const corpus &corp)
 Look into a given corpus to find a union type which has a given qualified name. More...
 
union_decl_sptr lookup_union_type_per_location (const interned_string &loc, const corpus &corp)
 Lookup a union type in a given corpus, from its location. More...
 
union_decl_sptr lookup_union_type_per_location (const string &loc, const corpus &corp)
 Lookup a union type in a given corpus, from its location. More...
 
const type_base_wptrs_typelookup_union_types (const interned_string &qualified_name, const corpus &corp)
 Look into a given corpus to find the union type*s* that have a given qualified name. More...
 
const type_base_wptrs_typelookup_union_types (const string &qualified_name, const corpus &corp)
 Look into a given corpus to find the union types that have a given qualified name. More...
 
const decl_base_sptr lookup_var_decl_in_scope (const std::list< string > &comps, const scope_decl_sptr &skope)
 lookup a var_decl in a scope. More...
 
const decl_base_sptr lookup_var_decl_in_scope (const string &fqn, const scope_decl_sptr &skope)
 Lookup a var_decl in a scope. More...
 
template<>
void mark_types_as_being_compared (const class_decl &l, const class_decl &r)
 Mark a pair of class_decl types as being compared. More...
 
template<typename T >
void mark_types_as_being_compared (T &l, T &r)
 Mark a pair of types as being compared. More...
 
bool maybe_compare_as_member_decls (const decl_base &l, const decl_base &r, change_kind *k)
 Compare the properties that belong to the "is-a-member-relation" of a decl. More...
 
template<typename T >
T * maybe_get_canonical_type (T *t)
 Get the canonical type of a given type T* as a T*. More...
 
void maybe_update_scope_lookup_map (const decl_base_sptr &member_scope)
 
void maybe_update_scope_lookup_map (const scope_decl_sptr &member_scope)
 
void maybe_update_types_lookup_map (const array_type_def::subrange_sptr &subrange_type)
 Update the map that associates the fully qualified name of a type with the type itself. More...
 
void maybe_update_types_lookup_map (const array_type_def_sptr &array_type)
 Update the map that associates the fully qualified name of a type with the type itself. More...
 
void maybe_update_types_lookup_map (const class_decl_sptr &class_type)
 Update the map that associates the fully qualified name of a class type with the type itself. More...
 
void maybe_update_types_lookup_map (const decl_base_sptr &decl)
 Update the map that associates the fully qualified name of a type declaration with the type itself. More...
 
void maybe_update_types_lookup_map (const enum_type_decl_sptr &enum_type)
 Update the map that associates the fully qualified name of an enum type with the type itself. More...
 
void maybe_update_types_lookup_map (const function_type_sptr &fn_type)
 Update the map that associates the fully qualified name of a function type with the type itself. More...
 
void maybe_update_types_lookup_map (const pointer_type_def_sptr &pointer_type)
 Update the map that associates the fully qualified name of a pointer type with the type itself. More...
 
void maybe_update_types_lookup_map (const ptr_to_mbr_type_sptr &ptr_to_member)
 Update the map that associates the fully qualified name of a pointer-to-member type with the type itself. More...
 
void maybe_update_types_lookup_map (const qualified_type_def_sptr &qualified_type)
 Update the map that associates the fully qualified name of a qualified type with the type itself. More...
 
void maybe_update_types_lookup_map (const reference_type_def_sptr &reference_type)
 Update the map that associates the fully qualified name of a reference type with the type itself. More...
 
template<typename TypeKind >
bool maybe_update_types_lookup_map (const shared_ptr< TypeKind > &type, istring_type_base_wptrs_map_type &types_map, bool use_type_name_as_key=true)
 Update the map that associates a fully qualified name of a given type to that type. More...
 
void maybe_update_types_lookup_map (const type_base_sptr &type)
 Update the map that associates the fully qualified name of a type with the type itself. More...
 
void maybe_update_types_lookup_map (const type_decl_sptr &basic_type)
 Update the map that associates the fully qualified name of a basic type with the type itself. More...
 
void maybe_update_types_lookup_map (const typedef_decl_sptr &typedef_type)
 Update the map that associates the fully qualified name of a typedef type with the type itself. More...
 
void maybe_update_types_lookup_map (const union_decl_sptr &union_type)
 Update the map that associates the fully qualified name of a union type with the type itself. More...
 
void maybe_update_types_lookup_map (scope_decl *scope, const function_type_sptr &function_type)
 
template<>
bool maybe_update_types_lookup_map< class_decl > (const class_decl_sptr &class_type, istring_type_base_wptrs_map_type &map, bool use_type_name_as_key)
 This is the specialization for type class_decl of the function template: More...
 
template<>
bool maybe_update_types_lookup_map< function_type > (const function_type_sptr &type, istring_type_base_wptrs_map_type &types_map, bool)
 This is the specialization for type function_type of the function template: More...
 
bool member_function_has_vtable_offset (const function_decl &f)
 Test if a virtual member function has a vtable offset set. More...
 
bool odr_is_relevant (const type_or_decl_base &artifact)
 By looking at the language of the TU a given ABI artifact belongs to, test if the ONE Definition Rule should apply. More...
 
bool operator!= (const class_decl::base_spec_sptr &l, const class_decl::base_spec_sptr &r)
 Inequality operator for smart pointers to class_decl::base_specs. More...
 
bool operator!= (const class_decl_sptr &l, const class_decl_sptr &r)
 Turn inequality of shared_ptr of class_decl into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator!= (const class_or_union_sptr &l, const class_or_union_sptr &r)
 Turn inequality of shared_ptr of class_or_union into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator!= (const decl_base_sptr &l, const decl_base_sptr &r)
 Inequality operator of shared_ptr of decl_base. More...
 
bool operator!= (const elf_symbol_sptr &lhs, const elf_symbol_sptr &rhs)
 Inequality operator for smart pointers to elf_symbol. More...
 
bool operator!= (const enum_type_decl_sptr &l, const enum_type_decl_sptr &r)
 Inequality operator for enum_type_decl_sptr. More...
 
bool operator!= (const function_decl::parameter_sptr &l, const function_decl::parameter_sptr &r)
 Non-member inequality operator for function_decl::parameter. More...
 
bool operator!= (const function_decl_sptr &l, const function_decl_sptr &r)
 A deep inequality operator for smart pointers to functions. More...
 
bool operator!= (const member_class_template_sptr &l, const member_class_template_sptr &r)
 Inequality operator for the member_class_template type. More...
 
bool operator!= (const member_function_template_sptr &l, const member_function_template_sptr &r)
 Inequality operator for smart pointers to member_function_template. This is compares the pointed-to instances. More...
 
bool operator!= (const method_decl_sptr &l, const method_decl_sptr &r)
 Inequality operator for method_decl_sptr. More...
 
bool operator!= (const pointer_type_def_sptr &l, const pointer_type_def_sptr &r)
 Turn inequality of shared_ptr of pointer_type_def into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator!= (const qualified_type_def_sptr &l, const qualified_type_def_sptr &r)
 Non-member inequality operator for qualified_type_def. More...
 
bool operator!= (const reference_type_def_sptr &l, const reference_type_def_sptr &r)
 Turn inequality of shared_ptr of reference_type_def into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator!= (const scope_decl_sptr &l, const scope_decl_sptr &r)
 Inequality operator for scope_decl_sptr. More...
 
bool operator!= (const translation_unit_sptr &l, const translation_unit_sptr &r)
 A deep inequality operator for pointers to translation units. More...
 
bool operator!= (const type_base_sptr &l, const type_base_sptr &r)
 Turn inequality of shared_ptr of type_base into a deep equality; that is, make it compare the pointed to objects.. More...
 
bool operator!= (const type_decl_sptr &l, const type_decl_sptr &r)
 Inequality operator for type_decl_sptr. More...
 
bool operator!= (const type_or_decl_base_sptr &l, const type_or_decl_base_sptr &r)
 Non-member inequality operator for the @type_or_decl_base type. More...
 
bool operator!= (const union_decl_sptr &l, const union_decl_sptr &r)
 Turn inequality of shared_ptr of union_decl into a deep equality; that is, make it compare the pointed to objects too. More...
 
change_kind operator& (change_kind l, change_kind r)
 
corpus::origin operator& (corpus::origin l, corpus::origin r)
 Bitwise & operator for the corpus::origin type. More...
 
qualified_type_def::CV operator& (qualified_type_def::CV lhs, qualified_type_def::CV rhs)
 Overloaded bitwise AND operator for CV qualifiers. More...
 
real_type::modifiers_type operator& (real_type::modifiers_type l, real_type::modifiers_type r)
 Bitwise AND operator for real_type::modifiers_type. More...
 
type_or_decl_base::type_or_decl_kind operator& (type_or_decl_base::type_or_decl_kind l, type_or_decl_base::type_or_decl_kind r)
 bitwise "AND" operator for the type_or_decl_base::type_or_decl_kind bitmap type. More...
 
change_kindoperator&= (change_kind &l, change_kind r)
 
corpus::origin operator&= (corpus::origin &l, corpus::origin r)
 Bitwise &= operator for the corpus::origin type. More...
 
qualified_type_def::CVoperator&= (qualified_type_def::CV &l, qualified_type_def::CV r)
 Overloaded bitwise &= operator for cv qualifiers. More...
 
real_type::modifiers_typeoperator&= (real_type::modifiers_type &l, real_type::modifiers_type r)
 Bitwise &= operator for real_type::modifiers_type. More...
 
type_or_decl_base::type_or_decl_kindoperator&= (type_or_decl_base::type_or_decl_kind &l, type_or_decl_base::type_or_decl_kind r)
 bitwise "A&=" operator for the type_or_decl_base::type_or_decl_kind bitmap type. More...
 
std::ostream & operator<< (std::ostream &o, access_specifier a)
 Streaming operator for class_decl::access_specifier. More...
 
std::ostream & operator<< (std::ostream &o, decl_base::binding b)
 Streaming operator for decl_base::binding. More...
 
std::ostream & operator<< (std::ostream &o, decl_base::visibility v)
 Streaming operator for the decl_base::visibility. More...
 
std::ostream & operator<< (std::ostream &o, elf_symbol::binding b)
 Serialize an instance of symbol_binding and stream it to a given output stream. More...
 
std::ostream & operator<< (std::ostream &o, elf_symbol::type t)
 Serialize an instance of symbol_type and stream it to a given output stream. More...
 
std::ostream & operator<< (std::ostream &o, elf_symbol::visibility v)
 Serialize an instance of elf_symbol::visibility and stream it to a given output stream. More...
 
std::ostream & operator<< (std::ostream &o, qualified_type_def::CV cv)
 Streaming operator for qualified_type_decl::CV. More...
 
bool operator== (const class_decl::base_spec_sptr &l, const class_decl::base_spec_sptr &r)
 Equality operator for smart pointers to class_decl::base_specs. More...
 
bool operator== (const class_decl_sptr &l, const class_decl_sptr &r)
 Turn equality of shared_ptr of class_decl into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator== (const class_or_union_sptr &l, const class_or_union_sptr &r)
 Turn equality of shared_ptr of class_or_union into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator== (const decl_base_sptr &l, const decl_base_sptr &r)
 Turn equality of shared_ptr of decl_base into a deep equality; that is, make it compare the pointed to objects, not just the pointers. More...
 
bool operator== (const elf_symbol_sptr &lhs, const elf_symbol_sptr &rhs)
 Equality operator for smart pointers to elf_symbol. More...
 
bool operator== (const enum_type_decl_sptr &l, const enum_type_decl_sptr &r)
 Equality operator for enum_type_decl_sptr. More...
 
bool operator== (const function_decl::parameter_sptr &l, const function_decl::parameter_sptr &r)
 Non-member equality operator for function_decl::parameter. More...
 
bool operator== (const function_decl_sptr &l, const function_decl_sptr &r)
 A deep comparison operator for a shared pointer to function_decl. More...
 
bool operator== (const member_class_template_sptr &l, const member_class_template_sptr &r)
 Comparison operator for the member_class_template type. More...
 
bool operator== (const member_function_template_sptr &l, const member_function_template_sptr &r)
 Equality operator for smart pointers to member_function_template. This is compares the pointed-to instances. More...
 
bool operator== (const method_decl_sptr &l, const method_decl_sptr &r)
 Equality operator for method_decl_sptr. More...
 
bool operator== (const pointer_type_def_sptr &l, const pointer_type_def_sptr &r)
 Turn equality of shared_ptr of pointer_type_def into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator== (const qualified_type_def_sptr &l, const qualified_type_def_sptr &r)
 Non-member equality operator for qualified_type_def. More...
 
bool operator== (const reference_type_def_sptr &l, const reference_type_def_sptr &r)
 Turn equality of shared_ptr of reference_type_def into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator== (const scope_decl_sptr &l, const scope_decl_sptr &r)
 Equality operator for scope_decl_sptr. More...
 
bool operator== (const translation_unit_sptr &l, const translation_unit_sptr &r)
 A deep comparison operator for pointers to translation units. More...
 
bool operator== (const type_base_sptr &l, const type_base_sptr &r)
 Turn equality of shared_ptr of type_base into a deep equality; that is, make it compare the pointed to objects too. More...
 
bool operator== (const type_decl_sptr &l, const type_decl_sptr &r)
 Equality operator for type_decl_sptr. More...
 
bool operator== (const type_or_decl_base &lr, const type_or_decl_base &rr)
 Non-member equality operator for the @type_or_decl_base type. More...
 
bool operator== (const type_or_decl_base_sptr &l, const type_or_decl_base_sptr &r)
 Non-member equality operator for the @type_or_decl_base type. More...
 
bool operator== (const union_decl_sptr &l, const union_decl_sptr &r)
 Turn equality of shared_ptr of union_decl into a deep equality; that is, make it compare the pointed to objects too. More...
 
change_kind operator| (change_kind l, change_kind r)
 
corpus::origin operator| (corpus::origin l, corpus::origin r)
 Bitwise | operator for the corpus::origin type. More...
 
qualified_type_def::CV operator| (qualified_type_def::CV lhs, qualified_type_def::CV rhs)
 Overloaded bitwise OR operator for cv qualifiers. More...
 
real_type::modifiers_type operator| (real_type::modifiers_type l, real_type::modifiers_type r)
 Bitwise OR operator for real_type::modifiers_type. More...
 
type_or_decl_base::type_or_decl_kind operator| (type_or_decl_base::type_or_decl_kind l, type_or_decl_base::type_or_decl_kind r)
 bitwise "OR" operator for the type_or_decl_base::type_or_decl_kind bitmap type. More...
 
change_kindoperator|= (change_kind &l, change_kind r)
 
corpus::origin operator|= (corpus::origin &l, corpus::origin r)
 Bitwise |= operator for the corpus::origin type. More...
 
qualified_type_def::CVoperator|= (qualified_type_def::CV &l, qualified_type_def::CV r)
 Overloaded bitwise |= operator for cv qualifiers. More...
 
real_type::modifiers_typeoperator|= (real_type::modifiers_type &l, real_type::modifiers_type r)
 Bitwise |= operator for real_type::modifiers_type. More...
 
type_or_decl_base::type_or_decl_kindoperator|= (type_or_decl_base::type_or_decl_kind &l, type_or_decl_base::type_or_decl_kind r)
 bitwise "|=" operator for the type_or_decl_base::type_or_decl_kind bitmap type. More...
 
qualified_type_def::CV operator~ (qualified_type_def::CV q)
 Overloaded bitwise inverting operator for CV qualifiers. More...
 
real_type::modifiers_type operator~ (real_type::modifiers_type l)
 Bitwise one's complement operator for real_type::modifiers_type. More...
 
bool parse_real_type (const string &str, real_type &type)
 Parse a real type from a string. More...
 
hash_t peek_hash_value (const type_or_decl_base &artefact)
 Get the hash value associated to an IR node. More...
 
const type_basepeel_array_type (const type_base *type)
 Return the leaf element type of an array. More...
 
const type_base_sptr peel_array_type (const type_base_sptr &type)
 Return the leaf element type of an array. More...
 
type_base_sptr peel_const_qualified_type (const qualified_type_def_sptr &q)
 If a qualified type is const, then return its underlying type. More...
 
type_basepeel_pointer_or_reference_type (const type_base *type, bool peel_qual_type)
 Return the leaf underlying or pointed-to type node of a, pointer_type_def, reference_type_def or qualified_type_def type node. More...
 
const type_basepeel_pointer_type (const type_base *type)
 Return the leaf pointed-to type node of a pointer_type_def node. More...
 
type_base_sptr peel_pointer_type (const type_base_sptr &type)
 Return the leaf pointed-to type node of a pointer_type_def node. More...
 
type_basepeel_qualified_or_typedef_type (const type_base *type)
 Return the leaf underlying type of a qualified or typedef type. More...
 
type_base_sptr peel_qualified_or_typedef_type (const type_base_sptr &t)
 Return the leaf underlying type of a qualified or typedef type. More...
 
const type_basepeel_qualified_type (const type_base *type)
 Return the leaf underlying type of a qualified type. More...
 
const type_base_sptr peel_qualified_type (const type_base_sptr &type)
 Return the leaf underlying type of a qualified type. More...
 
const type_basepeel_reference_type (const type_base *type)
 Return the leaf pointed-to type node of a reference_type_def node. More...
 
type_base_sptr peel_reference_type (const type_base_sptr &type)
 Return the leaf pointed-to type node of a reference_type_def node. More...
 
type_basepeel_typedef_pointer_or_reference_type (const type_base *type)
 Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def or reference_type_def node. More...
 
type_basepeel_typedef_pointer_or_reference_type (const type_base *type, bool peel_qual_type)
 Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def or reference_type_def node. More...
 
type_base_sptr peel_typedef_pointer_or_reference_type (const type_base_sptr type)
 Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def, reference_type_def, or array_type_def node. More...
 
const type_basepeel_typedef_type (const type_base *type)
 Return the leaf underlying type node of a typedef_decl node. More...
 
type_base_sptr peel_typedef_type (const type_base_sptr &type)
 Return the leaf underlying type node of a typedef_decl node. More...
 
void pop_composite_type_comparison_operands (const type_base &left, const type_base &right)
 Pop a pair of operands from the stack of operands to the current type comparison. More...
 
void push_composite_type_comparison_operands (const type_base &left, const type_base &right)
 Push a pair of operands on the stack of operands of the current type comparison, during type canonicalization. More...
 
void remove_decl_from_scope (decl_base_sptr decl)
 Remove a given decl from its scope. More...
 
template<typename T >
bool return_comparison_result (T &l, T &r, bool value)
 Return the result of the comparison of two (sub) types. More...
 
void set_data_member_is_laid_out (var_decl_sptr m, bool l)
 Set a flag saying if a data member is laid out. More...
 
void set_data_member_offset (var_decl_sptr m, uint64_t o)
 Set the offset of a data member into its containing class. More...
 
void set_member_access_specifier (const decl_base_sptr &d, access_specifier a)
 Sets the access specifier for a class member. More...
 
void set_member_access_specifier (decl_base &d, access_specifier a)
 Sets the access specifier for a class member. More...
 
void set_member_function_is_const (const function_decl_sptr &f, bool is_const)
 set the const-ness property of a member function. More...
 
void set_member_function_is_const (function_decl &f, bool is_const)
 set the const-ness property of a member function. More...
 
void set_member_function_is_ctor (const function_decl &, bool)
 
void set_member_function_is_ctor (const function_decl_sptr &f, bool c)
 Setter for the is_ctor property of the member function. More...
 
void set_member_function_is_ctor (function_decl &f, bool c)
 Setter for the is_ctor property of the member function. More...
 
void set_member_function_is_dtor (const function_decl_sptr &f, bool d)
 Set the destructor-ness property of a member function. More...
 
void set_member_function_is_dtor (function_decl &f, bool d)
 Set the destructor-ness property of a member function. More...
 
void set_member_function_virtuality (const function_decl_sptr &fn, bool is_virtual, ssize_t voffset)
 Set the virtual-ness of a member fcuntion. More...
 
void set_member_function_virtuality (function_decl &fn, bool is_virtual, ssize_t voffset)
 Set the virtual-ness of a member fcuntion. More...
 
void set_member_function_virtuality (function_decl *fn, bool is_virtual, ssize_t voffset)
 Set the virtual-ness of a member fcuntion. More...
 
void set_member_is_static (const decl_base_sptr &d, bool s)
 Sets the static-ness property of a class member. More...
 
void set_member_is_static (decl_base &d, bool s)
 Sets the static-ness property of a class member. More...
 
template<typename T >
hash_t set_or_get_cached_hash_value (const T &tod)
 Set the hash value of an IR node and return it. More...
 
template<typename T >
hash_t set_or_get_cached_hash_value (const T *artifact)
 Set the hash value of an IR node and return it. More...
 
template<typename IteratorType , typename deref_lambda >
void sort_and_canonicalize_types (IteratorType begin, IteratorType end, deref_lambda deref)
 Sort and canonicalize a sequence of types. More...
 
void sort_types (const canonical_type_sptr_set_type &types, vector< type_base_sptr > &result)
 Sort types in a hopefully stable manner. More...
 
template<typename IteratorType >
void sort_types_for_hash_computing_and_c14n (IteratorType begin, IteratorType end)
 Sort types before hashing (and then canonicalizing) them. More...
 
void sort_types_for_hash_computing_and_c14n (vector< type_base_sptr > &types)
 Sort types right before hashing and canonicalizing them. More...
 
bool string_to_elf_symbol_binding (const string &s, elf_symbol::binding &b)
 Convert a string representing a an elf symbol binding into an elf_symbol::binding. More...
 
bool string_to_elf_symbol_type (const string &s, elf_symbol::type &t)
 Convert a string representing a symbol type into an elf_symbol::type. More...
 
bool string_to_elf_symbol_visibility (const string &s, elf_symbol::visibility &v)
 Convert a string representing a an elf symbol visibility into an elf_symbol::visibility. More...
 
translation_unit::language string_to_translation_unit_language (const string &l)
 Parse a string representing a language into a translation_unit::language enumerator into a string. More...
 
void strip_redundant_quals_from_underyling_types (const qualified_type_def_sptr &t)
 Merge redundant qualifiers from a tree of qualified types. More...
 
type_base_sptr strip_typedef (const type_base_sptr type)
 Recursively returns the the underlying type of a typedef. The return type should not be a typedef of anything anymore. More...
 
decl_base_sptr strip_useless_const_qualification (const qualified_type_def_sptr t)
 Strip qualification from a qualified type, when it makes sense. More...
 
function_type_sptr synthesize_function_type_from_translation_unit (const function_type &fn_type, translation_unit &tu)
 In a translation unit, lookup the sub-types that make up a given function type and if the sub-types are all found, synthesize and return a function_type with them. More...
 
type_base_sptr synthesize_type_from_translation_unit (const type_base_sptr &type, translation_unit &tu)
 In a translation unit, lookup a given type or synthesize it if it's a qualified type. More...
 
string translation_unit_language_to_string (translation_unit::language l)
 Converts a translation_unit::language enumerator into a string. More...
 
template<typename T >
bool try_canonical_compare (const T *l, const T *r)
 Compare two types by comparing their canonical types if present. More...
 
type_basetype_has_non_canonicalized_subtype (type_base_sptr t)
 Test if a type has sub-types that are non-canonicalized. More...
 
bool type_has_sub_type_changes (const type_base_sptr t_v1, const type_base_sptr t_v2)
 Tests if the change of a given type effectively comes from just its sub-types. That is, if the type has changed but its type name hasn't changed, then the change of the type mostly likely is a sub-type change. More...
 
bool type_is_suitable_for_hash_computing (const type_base &t)
 Test if we should attempt to compute a hash value for a given type. More...
 
type_base_sptr type_or_void (const type_base_sptr t, const environment &env)
 Return either the type given in parameter if it's non-null, or the void type. More...
 
bool type_originates_from_corpus (type_base_sptr t, corpus_sptr &c)
 Test if a type originates from a corpus. More...
 
bool types_are_compatible (const decl_base_sptr d1, const decl_base_sptr d2)
 Test if two types are equal modulo a typedef. More...
 
bool types_are_compatible (const type_base_sptr type1, const type_base_sptr type2)
 Test if two types are equal modulo a typedef or CV qualifiers. More...
 
bool types_have_similar_structure (const type_base *first, const type_base *second, bool indirect_type)
 Test if two types have similar structures, even though they are (or can be) different. More...
 
bool types_have_similar_structure (const type_base_sptr &first, const type_base_sptr &second, bool indirect_type)
 Test if two types have similar structures, even though they are (or can be) different. More...
 
template<>
void unmark_types_as_being_compared (const class_decl &l, const class_decl &r)
 Mark a pair of class_decl types as being not compared anymore. More...
 
template<typename T >
void unmark_types_as_being_compared (T &l, T &r)
 Mark a pair of types as being not compared anymore. More...
 
bool var_equals_modulo_types (const var_decl &l, const var_decl &r, change_kind *k)
 Compares two instances of var_decl without taking their type into account. More...
 

Detailed Description

The namespace of the internal representation of ABI artifacts like types and decls.

Typedef Documentation

◆ array_type_def_sptr

typedef shared_ptr<array_type_def> array_type_def_sptr

Convenience typedef for a shared pointer on a array_type_def.

Definition at line 244 of file abg-fwd.h.

◆ artifact_ptr_set_type

A convenience typedef for a hash set of const type_or_decl_base*.

Definition at line 564 of file abg-ir.h.

◆ artifact_sptr_set_type

A convenience typedef for a hash set of type_or_decl_base_sptr.

Definition at line 559 of file abg-ir.h.

◆ canonical_type_sptr_set_type

typedef unordered_set<type_base_sptr, canonical_type_hash> canonical_type_sptr_set_type

Helper typedef for an unordered set of type_base_sptr which uses pointer value to tell its members appart, because the members are canonical types.

Definition at line 121 of file abg-ir.h.

◆ class_decl_sptr

typedef shared_ptr<class_decl> class_decl_sptr

Convenience typedef for a shared pointer on a class_decl.

Definition at line 193 of file abg-fwd.h.

◆ class_decl_wptr

typedef weak_ptr<class_decl> class_decl_wptr

Convenience typedef for a weak pointer on a class_decl.

Definition at line 202 of file abg-fwd.h.

◆ class_or_union_sptr

typedef shared_ptr<class_or_union> class_or_union_sptr

Definition at line 185 of file abg-fwd.h.

◆ class_or_union_wptr

typedef weak_ptr<class_or_union> class_or_union_wptr

Definition at line 186 of file abg-fwd.h.

◆ class_set_type

typedef unordered_set<const class_or_union*> class_set_type

A convenience typedef for a set of pointer to class_or_union.

Definition at line 526 of file abg-ir-priv.h.

◆ class_tdecl_sptr

typedef shared_ptr<class_tdecl> class_tdecl_sptr

Convenience typedef for a shared pointer on a class_tdecl.

Definition at line 289 of file abg-fwd.h.

◆ classes_or_unions_type

typedef vector<class_or_union_sptr> classes_or_unions_type

Convenience typedef for a vector of class_or_union_sptr.

Definition at line 199 of file abg-fwd.h.

◆ classes_type

typedef vector<class_decl_sptr> classes_type

Convenience typedef for a vector of class_decl_sptr.

Definition at line 196 of file abg-fwd.h.

◆ context_rel_sptr

typedef shared_ptr<context_rel> context_rel_sptr

A convenience typedef for shared pointers to context_rel.

Definition at line 1275 of file abg-ir.h.

◆ corpus_group_sptr

typedef shared_ptr<corpus_group> corpus_group_sptr

Definition at line 99 of file abg-fwd.h.

◆ corpus_sptr

typedef shared_ptr<corpus> corpus_sptr

Definition at line 96 of file abg-fwd.h.

◆ corpus_wptr

typedef weak_ptr<corpus> corpus_wptr

Convenience typedef for a weak pointer to a corpus.

Definition at line 131 of file abg-fwd.h.

◆ decl_base_sptr

typedef shared_ptr<decl_base> decl_base_sptr

Definition at line 153 of file abg-fwd.h.

◆ decl_base_wptr

typedef weak_ptr<decl_base> decl_base_wptr

Convenience typedef for a weak pointer to a decl_base.

Definition at line 181 of file abg-fwd.h.

◆ dm_context_rel_sptr

typedef shared_ptr<dm_context_rel> dm_context_rel_sptr

A convenience typedef for a shared pointer to dm_context_rel.

Definition at line 251 of file abg-fwd.h.

◆ elf_symbol_sptr

typedef shared_ptr<elf_symbol> elf_symbol_sptr

A convenience typedef for a shared pointer to elf_symbol.

Definition at line 926 of file abg-ir.h.

◆ elf_symbol_wptr

typedef weak_ptr<elf_symbol> elf_symbol_wptr

A convenience typedef for a weak pointer to elf_symbol.

Definition at line 929 of file abg-ir.h.

◆ elf_symbols

typedef std::vector<elf_symbol_sptr> elf_symbols

Convenience typedef for a vector of elf_symbol.

Definition at line 942 of file abg-ir.h.

◆ enum_type_decl_sptr

typedef shared_ptr<enum_type_decl> enum_type_decl_sptr

Convenience typedef for shared pointer to a enum_type_decl.

Definition at line 175 of file abg-fwd.h.

◆ enums_type

Convenience typedef for a vector of enum_type_decl_sptr.

Definition at line 178 of file abg-fwd.h.

◆ environment_sptr

typedef shared_ptr<environment> environment_sptr

Convenience typedef for a shared pointer to an environment.

Definition at line 113 of file abg-fwd.h.

◆ fn_ptr_map_type

Convenience typedef for a hash map of pointer to function_decl and boolean.

Definition at line 221 of file abg-corpus.cc.

◆ fn_set_type

typedef unordered_set<const function_type*> fn_set_type

A convenience typedef for a set of pointer to function_type.

Definition at line 529 of file abg-ir-priv.h.

◆ fn_type_ptr_map

typedef unordered_map<function_type_sptr, bool, function_type::hash, type_shared_ptr_equal> fn_type_ptr_map

Definition at line 546 of file abg-ir.cc.

◆ fns_to_str_map_type

typedef unordered_map<const function_decl*, string, function_decl_hash, function_decl::ptr_equal> fns_to_str_map_type

Convenience typedef for a hash map of pointer to function_decl and string.

Definition at line 30363 of file abg-ir.cc.

◆ function_decl_sptr

typedef shared_ptr<function_decl> function_decl_sptr

Convenience typedef for a shared pointer on a function_decl.

Definition at line 269 of file abg-fwd.h.

◆ function_tdecl_sptr

typedef shared_ptr<function_tdecl> function_tdecl_sptr

Convenience typedef for a shared pointer on a function_tdecl.

Definition at line 294 of file abg-fwd.h.

◆ function_type_sptr

typedef shared_ptr<function_type> function_type_sptr

Convenience typedef for a shared pointer on a function_type.

Definition at line 210 of file abg-fwd.h.

◆ function_type_wptr

typedef weak_ptr<function_type> function_type_wptr

Convenience typedef for a weak pointer on a function_type.

Definition at line 216 of file abg-fwd.h.

◆ function_types_type

Convenience typedef fo a vector of function_type_sptr.

Definition at line 213 of file abg-fwd.h.

◆ global_scope_sptr

typedef shared_ptr<global_scope> global_scope_sptr

Convenience typedef for shared pointer on global_scope.

Definition at line 299 of file abg-fwd.h.

◆ hash_t

typedef abg_compat::optional<uint64_t> hash_t

The abstraction for an 8 bytes hash value.

As this is an optional uint64_t value, it allows the represent empty hash values.

Definition at line 105 of file abg-ir.h.

◆ interned_string_bool_map_type

Convenience typedef for a map of interned_string -> bool.

Definition at line 3365 of file abg-ir.cc.

◆ ir_traversable_base_sptr

Convenience typedef for a shared pointer to ir_traversable_base.

Definition at line 109 of file abg-fwd.h.

◆ istr_fn_ptr_set_map_type

typedef unordered_map<interned_string, std::unordered_set<function_decl*>, hash_interned_string> istr_fn_ptr_set_map_type

Convenience typedef for a hash map which key is an interned_string and which data is a set of abigail::ir::function_decl*.

Definition at line 54 of file abg-corpus-priv.h.

◆ istr_var_ptr_map_type

Convenience typedef for a hash map which key is an interned_string and which data is an abigail::ir::var_decl*.

Definition at line 64 of file abg-corpus-priv.h.

◆ istr_var_ptr_set_map_type

typedef unordered_map<interned_string, std::unordered_set<var_decl_sptr>, hash_interned_string> istr_var_ptr_set_map_type

Convenience typedef for a hash map which key is an interned_string and which data is a set of abigail::ir::var_decl_sptr.

Definition at line 70 of file abg-corpus-priv.h.

◆ istring_function_decl_ptr_map_type

typedef unordered_map<interned_string, const function_decl*, hash_interned_string> istring_function_decl_ptr_map_type

Definition at line 588 of file abg-ir.h.

◆ istring_type_base_wptr_map_type

A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr.

Definition at line 577 of file abg-ir.h.

◆ istring_type_base_wptrs_map_type

A convenience typedef for a map which key is an interned_string and which value is a vector of type_base_wptr.

Definition at line 148 of file abg-fwd.h.

◆ istring_type_or_decl_base_sptr_map_type

A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr.

Definition at line 584 of file abg-ir.h.

◆ istring_var_decl_ptr_map_type

typedef unordered_map<interned_string, var_decl_sptr, hash_interned_string> istring_var_decl_ptr_map_type

Definition at line 592 of file abg-ir.h.

◆ mem_fn_context_rel_sptr

A convenience typedef for a shared pointer to mem_fn_context_rel.

Definition at line 279 of file abg-fwd.h.

◆ member_class_template_sptr

typedef shared_ptr<member_class_template> member_class_template_sptr

Definition at line 339 of file abg-fwd.h.

◆ member_class_templates

typedef vector<member_class_template_sptr> member_class_templates

Definition at line 340 of file abg-fwd.h.

◆ member_function_template_sptr

typedef shared_ptr<member_function_template> member_function_template_sptr

Definition at line 335 of file abg-fwd.h.

◆ member_function_templates

typedef vector<member_function_template_sptr> member_function_templates

Definition at line 336 of file abg-fwd.h.

◆ method_decl_sptr

typedef shared_ptr<method_decl> method_decl_sptr

Definition at line 273 of file abg-fwd.h.

◆ method_type_sptr

typedef shared_ptr<method_type> method_type_sptr

Convenience typedef for shared pointer to method_type.

Definition at line 221 of file abg-fwd.h.

◆ namespace_decl_sptr

typedef shared_ptr<namespace_decl> namespace_decl_sptr

Convenience typedef for a shared pointer on namespace_decl.

Definition at line 284 of file abg-fwd.h.

◆ namespaces_type

A convenience typedef for vectors of namespace_decl_sptr.

Definition at line 2229 of file abg-ir.h.

◆ non_type_tparameter_sptr

Convenience typedef for shared pointer to non_type_template_parameter.

Definition at line 320 of file abg-fwd.h.

◆ pointer_set

typedef unordered_set<uintptr_t> pointer_set

A convenience typedef for an unordered set of pointer values.

Definition at line 99 of file abg-ir.h.

◆ pointer_type_def_sptr

Convenience typedef for a shared pointer on a pointer_type_def.

Definition at line 226 of file abg-fwd.h.

◆ ptr_to_mbr_type_sptr

Convenience typedef for a shared pointer to a ptr_to_mbr_type.

Definition at line 239 of file abg-fwd.h.

◆ qualified_type_def_sptr

typedef shared_ptr<qualified_type_def> qualified_type_def_sptr

Definition at line 230 of file abg-fwd.h.

◆ reference_type_def_sptr

Convenience typedef for a shared pointer on a reference_type_def.

Definition at line 235 of file abg-fwd.h.

◆ regex_t_sptrs_type

typedef vector<regex_t_sptr> regex_t_sptrs_type

A convenience typedef for std::vector<regex_t_sptr>.

Definition at line 37 of file abg-corpus-priv.h.

◆ scope_decl_sptr

typedef shared_ptr<scope_decl> scope_decl_sptr

Convenience typedef for a shared pointer on a scope_decl.

Definition at line 264 of file abg-fwd.h.

◆ str_fn_ptr_map_type

typedef unordered_map<string, const function_decl*> str_fn_ptr_map_type

Convenience typedef for a hash map of string and pointer to function_decl.

Definition at line 225 of file abg-corpus.cc.

◆ str_fn_ptr_set_map_type

typedef unordered_map<string, std::unordered_set<function_decl*> > str_fn_ptr_set_map_type

Convenience typedef for a hash map which key is a string and which data is a set of abigail::ir::function_decl*.

Definition at line 48 of file abg-corpus-priv.h.

◆ str_fn_ptrs_map_type

typedef unordered_map<string, vector<function_decl*> > str_fn_ptrs_map_type

Convenience typedef for a hash map which key is a string and which data is a vector of abigail::ir::function_decl*.

Definition at line 43 of file abg-corpus-priv.h.

◆ str_var_ptr_map_type

typedef unordered_map<string, var_decl_sptr> str_var_ptr_map_type

Convenience typedef for a hash map which key is a string and which data is an abigail::ir::var_decl*.

Definition at line 58 of file abg-corpus-priv.h.

◆ string_decl_base_sptr_map

typedef unordered_map<string, decl_base_sptr> string_decl_base_sptr_map

Convenience typedef for a map which key is a string and which value is a decl_base_sptr.

Definition at line 157 of file abg-fwd.h.

◆ string_elf_symbol_sptr_map_sptr

Convenience typedef for a shared pointer to an string_elf_symbol_sptr_map_type.

Definition at line 939 of file abg-ir.h.

◆ string_elf_symbol_sptr_map_type

typedef std::unordered_map<string, elf_symbol_sptr> string_elf_symbol_sptr_map_type

Convenience typedef for a map which key is a string and which value if the elf symbol of the same name.

Definition at line 934 of file abg-ir.h.

◆ string_elf_symbols_map_sptr

Convenience typedef for a shared pointer to string_elf_symbols_map_type.

Definition at line 951 of file abg-ir.h.

◆ string_elf_symbols_map_type

typedef std::unordered_map<string, elf_symbols> string_elf_symbols_map_type

Convenience typedef for a map which key is a string and which value is a vector of elf_symbol.

Definition at line 947 of file abg-ir.h.

◆ string_tu_map_type

typedef unordered_map<string, translation_unit_sptr> string_tu_map_type

Convenience typedef for a map that associates a string to a translation unit.

Definition at line 139 of file abg-fwd.h.

◆ string_type_base_sptr_map_type

typedef unordered_map<string, type_base_sptr> string_type_base_sptr_map_type

A convenience typedef for a map which key is a string and which value is a type_base_sptr.

Definition at line 572 of file abg-ir.h.

◆ string_type_base_wptr_map_type

typedef unordered_map<string, type_base_wptr> string_type_base_wptr_map_type

A convenience typedef for a map which key is a string and which value is a type_base_wptr.

Definition at line 568 of file abg-ir.h.

◆ template_decl_sptr

typedef shared_ptr<template_decl> template_decl_sptr

Convenience typedef for a shared pointer to template_decl.

Definition at line 306 of file abg-fwd.h.

◆ template_decl_wptr

typedef weak_ptr<template_decl> template_decl_wptr

Convenience typedef for a weak pointer to template_decl.

Definition at line 309 of file abg-fwd.h.

◆ template_parameter_sptr

Convenience typedef for shared pointer to template parameter.

Definition at line 314 of file abg-fwd.h.

◆ template_tparameter_sptr

Convenience typedef for a shared_ptr to template_tparameter.

Definition at line 327 of file abg-fwd.h.

◆ translation_unit_sptr

Convenience typedef for a shared pointer on a translation_unit type.

Definition at line 136 of file abg-fwd.h.

◆ translation_units

Convenience typedef for an ordered set of translation_unit_sptr.

Definition at line 889 of file abg-ir.h.

◆ type_base_ptrs_type

typedef vector<type_base*> type_base_ptrs_type

Helper typedef for a vector of pointer to type_base.

Definition at line 124 of file abg-ir.h.

◆ type_base_sptr

typedef shared_ptr<type_base> type_base_sptr

Definition at line 125 of file abg-fwd.h.

◆ type_base_sptrs_type

typedef vector<type_base_sptr> type_base_sptrs_type

Helper typedef for a vector of shared pointer to a type_base.

Definition at line 127 of file abg-ir.h.

◆ type_base_wptr

typedef weak_ptr<type_base> type_base_wptr

Convenience typedef for a weak pointer on a type_base.

Definition at line 128 of file abg-fwd.h.

◆ type_base_wptrs_type

A convenience typedef for a vector of type_base_wptr.

Definition at line 142 of file abg-fwd.h.

◆ type_comparison_result_type

A convenience typedef for a map which key is a pair of uint64_t and which value is a boolean. This is initially intended to cache the result of comparing two (sub-)types.

Definition at line 535 of file abg-ir-priv.h.

◆ type_composition_sptr

Convenience typedef for shared pointer to type_composition.

Definition at line 343 of file abg-fwd.h.

◆ type_decl_sptr

typedef shared_ptr<type_decl> type_decl_sptr

Convenience typedef for a shared pointer on a type_decl.

Definition at line 161 of file abg-fwd.h.

◆ type_or_decl_base_sptr

A convenience typedef for a shared_ptr to type_or_decl_base.

Definition at line 120 of file abg-fwd.h.

◆ type_tparameter_sptr

Convenience typedef for a shared pointer to type_tparameter.

Definition at line 330 of file abg-fwd.h.

◆ typedef_decl_sptr

typedef shared_ptr<typedef_decl> typedef_decl_sptr

Convenience typedef for a shared pointer on a typedef_decl.

Definition at line 167 of file abg-fwd.h.

◆ typedef_decl_wptr

typedef weak_ptr<typedef_decl> typedef_decl_wptr

Convenience typedef for a weak pointer on a typedef_decl.

Definition at line 170 of file abg-fwd.h.

◆ uint64_t_pair_type

typedef std::pair<uint64_t, uint64_t> uint64_t_pair_type

A convenience typedef for a pair of uint64_t which is initially intended to store a pair of pointer values.

Definition at line 519 of file abg-ir-priv.h.

◆ uint64_t_pairs_set_type

A convenience typedef for a set of uint64_t_pair.

Definition at line 523 of file abg-ir-priv.h.

◆ union_decl_sptr

typedef shared_ptr<union_decl> union_decl_sptr

Definition at line 206 of file abg-fwd.h.

◆ var_decl_sptr

typedef shared_ptr<var_decl> var_decl_sptr

Convenience typedef for a shared pointer on a var_decl.

Definition at line 256 of file abg-fwd.h.

◆ var_decl_wptr

typedef weak_ptr<var_decl> var_decl_wptr

Convenience typedef for a weak pointer on a var_decl.

Definition at line 259 of file abg-fwd.h.

◆ var_ptr_map_type

typedef unordered_map<const var_decl*, bool, var_decl::hash, var_decl::ptr_equal> var_ptr_map_type

Convenience typedef for a hash map of pointer to var_decl and boolean.

Definition at line 231 of file abg-corpus.cc.

Enumeration Type Documentation

◆ access_specifier

Access specifier for class members.

Definition at line 916 of file abg-ir.h.

◆ change_kind

A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal representation artifacts are.

Enumerator
LOCAL_TYPE_CHANGE_KIND 

This means that a given IR artifact has a local type change.

LOCAL_NON_TYPE_CHANGE_KIND 

This means that a given IR artifact has a local non-type change. That is a change that is carried by the artifact itself, not by its type.

ALL_LOCAL_CHANGES_MASK 

Testing (anding) against this mask means that a given IR artifact has local differences, with respect to the other artifact it was compared against. A local change is a change that is carried by the artifact itself (or its type), rather than by one off its sub-types.

SUBTYPE_CHANGE_KIND 

This means that a given IR artifact has changes in some of its sub-types, with respect to the other artifact it was compared against.

Definition at line 1360 of file abg-ir.h.

◆ comparison_result

The result of structural comparison of type ABI artifacts.

Definition at line 34 of file abg-ir-priv.h.

◆ lookup_entity_kind

This enum describe the kind of entity to lookup, while using the lookup API.

Definition at line 12169 of file abg-ir.cc.

Function Documentation

◆ add_decl_to_scope() [1/2]

decl_base_sptr add_decl_to_scope ( decl_base_sptr  decl,
const scope_decl_sptr scope 
)

Appends a declaration to a given scope, if the declaration doesn't already belong to a scope.

Parameters
declthe declaration to add append to the scope
scopethe scope to append the decl to

Definition at line 8468 of file abg-ir.cc.

◆ add_decl_to_scope() [2/2]

decl_base_sptr add_decl_to_scope ( decl_base_sptr  decl,
scope_decl scope 
)

Appends a declaration to a given scope, if the declaration doesn't already belong to one and if the declaration is not for a type that is supposed to be unique.

Parameters
declthe declaration to add to the scope
scopethe scope to append the declaration to

Definition at line 8450 of file abg-ir.cc.

◆ anonymous_data_member_exists_in_class()

bool anonymous_data_member_exists_in_class ( const var_decl anon_dm,
const class_or_union clazz 
)

Test if a given anonymous data member exists in a class or union.

Parameters
anon_dmthe anonymous data member to consider.
clazzthe class to consider.
Returns
true iff anon_dm exists in the @clazz.

Definition at line 6114 of file abg-ir.cc.

◆ anonymous_data_member_to_class_or_union() [1/3]

class_or_union_sptr anonymous_data_member_to_class_or_union ( const var_decl d)

Get the class_or_union type of a given anonymous data member.

Parameters
dthe anonymous data member to consider.
Returns
the class_or_union type of the anonymous data member d.

Definition at line 6044 of file abg-ir.cc.

◆ anonymous_data_member_to_class_or_union() [2/3]

class_or_union * anonymous_data_member_to_class_or_union ( const var_decl d)

Get the class_or_union type of a given anonymous data member.

Parameters
dthe anonymous data member to consider.
Returns
the class_or_union type of the anonymous data member d.

Definition at line 6030 of file abg-ir.cc.

◆ anonymous_data_member_to_class_or_union() [3/3]

class_or_union_sptr anonymous_data_member_to_class_or_union ( const var_decl_sptr d)

Get the class_or_union type of a given anonymous data member.

Parameters
dthe anonymous data member to consider.
Returns
the class_or_union type of the anonymous data member d.

Definition at line 6099 of file abg-ir.cc.

◆ build_internal_underlying_enum_type_name()

string build_internal_underlying_enum_type_name ( const string &  base_name,
bool  is_anonymous,
uint64_t  size 
)

Build the internal name of the underlying type of an enum.

Parameters
base_namethe (unqualified) name of the enum the underlying type is destined to.
is_anonymoustrue if the underlying type of the enum is to be anonymous.

Definition at line 29019 of file abg-ir.cc.

◆ build_qualified_name() [1/2]

string build_qualified_name ( const scope_decl scope,
const string &  name 
)

Build and return a qualified name from a name and its scope.

The name is supposed to be for an entity that is part of the scope.

Parameters
thescope to consider.
nameof the name to consider.
Returns
a copy of the string that represents the qualified name.

Definition at line 8732 of file abg-ir.cc.

◆ build_qualified_name() [2/2]

string build_qualified_name ( const scope_decl scope,
const type_base_sptr &  type 
)

Build and return the qualified name of a type in its scope.

Parameters
scopethe scope of the type to consider.
typethe type to consider.

Definition at line 8755 of file abg-ir.cc.

◆ canonicalize()

type_base_sptr canonicalize ( type_base_sptr  t,
bool  do_log,
bool  show_stats 
)

Compute the canonical type of a given type.

It means that after invoking this function, comparing the intance instance type_base and another one (on which type_base::enable_canonical_equality() would have been invoked as well) is performed by just comparing the pointer values of the canonical types of both types. That equality comparison is supposedly faster than structural comparison of the types.

Parameters
ta smart pointer to the instance of type_base for which to compute the canonical type. After this call, t->get_canonical_type() will return the newly computed canonical type.
do_logif true then logs are emitted about canonicalization progress.
show_statsif true and if do_log is true as well, then more detailed logs are emitted about canonicalization.
Returns
the canonical type computed for t.

Definition at line 16169 of file abg-ir.cc.

◆ canonicalize_types()

void canonicalize_types ( const input_iterator &  begin,
const input_iterator &  end,
deref_lambda  deref,
bool  do_log = false,
bool  show_stats = false 
)

Compute the canonical type for all the IR types of the system.

After invoking this function, the time it takes to compare two types of the IR is equivalent to the time it takes to compare their pointer value. That is faster than performing a structural (A.K.A. member-wise) comparison.

Note that this function performs some sanity checks after* the canonicalization process. It ensures that at the end of the canonicalization process, all types have been canonicalized. This is important because the canonicalization algorithm sometimes clears some canonical types after having speculatively set them for performance purposes. At the end of the process however, all types must be canonicalized, and this function detects violations of that assertion.

Template Parameters
input_iteratorthe type of the input iterator of the beging and end.
deref_lambdaa lambda function which takes in parameter the input iterator of type input_iterator and dereferences it to return the type to canonicalize.
Parameters
beginan iterator pointing to the first type of the set of types to canonicalize.
endan iterator pointing past-the-end (after the last type) of the set of types to canonicalize.
derefa lambda function that knows how to dereference the iterator begin to return the type to canonicalize.

Definition at line 1461 of file abg-ir-priv.h.

◆ class_or_union_types_of_same_kind() [1/2]

bool class_or_union_types_of_same_kind ( const class_or_union first,
const class_or_union second 
)

Test if two class or union types are of the same kind.

Parameters
firstthe first type to consider.
secondthe second type to consider.
Returns
true iff first is of the same kind as second.

Definition at line 11343 of file abg-ir.cc.

◆ class_or_union_types_of_same_kind() [2/2]

bool class_or_union_types_of_same_kind ( const class_or_union_sptr &  first,
const class_or_union_sptr &  second 
)

Test if two class or union types are of the same kind.

Parameters
firstthe first type to consider.
secondthe second type to consider.
Returns
true iff first is of the same kind as second.

Definition at line 11361 of file abg-ir.cc.

◆ classes_have_same_layout()

bool classes_have_same_layout ( const type_base_sptr &  f,
const type_base_sptr &  s 
)

Test if two classes have the same layout.

Test if all the types and offsets of the members are equal, regardless of their access modifiers.

Parameters
fthe first class to take into account.
sthe second class to take into account.
Returns
true iff s and f are class types with the same layout.

Definition at line 10262 of file abg-ir.cc.

◆ clone_array()

array_type_def_sptr clone_array ( const array_type_def_sptr array)

Clone an array type.

Note that the element type of the new array is shared witht the old one.

Parameters
arraythe array type to clone.
Returns
a newly built array type. Note that it needs to be added to a scope (e.g, using add_decl_to_scope) for its lifetime to be bound to the one of that scope. Otherwise, its lifetime is bound to the lifetime of its containing shared pointer.

Definition at line 7548 of file abg-ir.cc.

◆ clone_array_tree()

type_base_sptr clone_array_tree ( const type_base_sptr  t)

Clone a type tree made of an array or a typedef of array.

Note that this can be a tree which root node is a typedef an which sub-tree can be any arbitrary combination of typedef, qualified type and arrays.

Parameters
tthe array or typedef of qualified array to consider.
Returns
a clone of t.

Definition at line 7668 of file abg-ir.cc.

◆ clone_qualified_type()

qualified_type_def_sptr clone_qualified_type ( const qualified_type_def_sptr &  t)

Clone a qualifiend type.

Note that underlying type of the newly constructed qualified type is shared with the old one.

Parameters
tthe qualified type to clone.
Returns
the newly constructed qualified type. Note that it needs to be added to a scope (e.g, using add_decl_to_scope) for its lifetime to be bound to the one of that scope. Otherwise, its lifetime is bound to the lifetime of its containing shared pointer.

Definition at line 7615 of file abg-ir.cc.

◆ clone_typedef()

typedef_decl_sptr clone_typedef ( const typedef_decl_sptr t)

Clone a typedef type.

Note that the underlying type of the newly constructed typedef is shared with the old one.

Parameters
tthe typedef to clone.
Returns
the newly constructed typedef. Note that it needs to be added to a scope (e.g, using add_decl_to_scope) for its lifetime to be bound to the one of that scope. Otherwise, its lifetime is bound to the lifetime of its containing shared pointer.

Definition at line 7590 of file abg-ir.cc.

◆ collect_non_anonymous_data_members() [1/2]

bool collect_non_anonymous_data_members ( const class_or_union cou,
string_decl_base_sptr_map dms 
)

Collect all the non-anonymous data members of a class or union type.

If the class contains any anonymous data member, this function looks through it to collect the non-anonymous data members that it contains. The function also also looks through the base classes of the current type.

Parameters
couthe class or union type to consider.
dmsoutput parameter. This is populated by the function with a map containing the non-anonymous data members that were collected. The key of the map is the name of the data member. This is set iff the function returns true.
Returns
true iff at least one non-anonymous data member was collected.

Definition at line 5815 of file abg-ir.cc.

◆ collect_non_anonymous_data_members() [2/2]

bool collect_non_anonymous_data_members ( const class_or_union_sptr &  cou,
string_decl_base_sptr_map dms 
)

Collect all the non-anonymous data members of a class or union type.

If the class contains any anonymous data member, this function looks through it to collect the non-anonymous data members that it contains. The function also also looks through the base classes of the current type.

Parameters
couthe class or union type to consider.
dmsoutput parameter. This is populated by the function with a map containing the non-anonymous data members that were collected. The key of the map is the name of the data member. This is set iff the function returns true.
Returns
true iff at least one non-anonymous data member was collected.

Definition at line 5863 of file abg-ir.cc.

◆ compare_using_locations()

bool compare_using_locations ( const decl_base f,
const decl_base s 
)

Compare decls using their locations.

Parameters
fthe first decl to compare.
sthe second decl to compare.
Returns
true if f compares less than s.

Definition at line 3413 of file abg-ir.cc.

◆ components_to_type_name()

string components_to_type_name ( const list< string > &  comps)

Turn a set of qualified name components (that name a type) into a qualified name string.

Parameters
compsthe name components
Returns
the resulting string, which would be the qualified name of a type.

Definition at line 12261 of file abg-ir.cc.

◆ compute_aliases_for_elf_symbol()

void compute_aliases_for_elf_symbol ( const elf_symbol sym,
const string_elf_symbols_map_type symtab,
vector< elf_symbol_sptr > &  aliases 
)

Definition at line 2871 of file abg-ir.cc.

◆ copy_member_function() [1/6]

method_decl_sptr copy_member_function ( const class_decl_sptr clazz,
const method_decl f 
)

Copy a method of a class into a new class.

Parameters
klassthe class into which the method is to be copied.
methodthe method to copy into klass.
Returns
the resulting newly copied method.

Definition at line 26198 of file abg-ir.cc.

◆ copy_member_function() [2/6]

method_decl_sptr copy_member_function ( const class_decl_sptr clazz,
const method_decl_sptr &  f 
)

Copy a method of a class into a new class.

Parameters
klassthe class into which the method is to be copied.
methodthe method to copy into klass.
Returns
the resulting newly copied method.

Definition at line 26187 of file abg-ir.cc.

◆ copy_member_function() [3/6]

method_decl_sptr copy_member_function ( const class_or_union_sptr &  t,
const method_decl method 
)

Copy a method of a class_or_union into a new class_or_union.

Parameters
tthe class_or_union into which the method is to be copied.
methodthe method to copy into t.
Returns
the resulting newly copied method.

Definition at line 24774 of file abg-ir.cc.

◆ copy_member_function() [4/6]

method_decl_sptr copy_member_function ( const class_or_union_sptr &  t,
const method_decl_sptr &  method 
)

Copy a method of a class_or_union into a new class_or_union.

Parameters
tthe class_or_union into which the method is to be copied.
methodthe method to copy into t.
Returns
the resulting newly copied method.

Definition at line 24760 of file abg-ir.cc.

◆ copy_member_function() [5/6]

method_decl_sptr copy_member_function ( const union_decl_sptr &  union_type,
const method_decl f 
)

Copy a method of a union_decl into a new union_decl.

Parameters
tthe union_decl into which the method is to be copied.
methodthe method to copy into t.
Returns
the resulting newly copied method.

Definition at line 27283 of file abg-ir.cc.

◆ copy_member_function() [6/6]

method_decl_sptr copy_member_function ( const union_decl_sptr &  union_type,
const method_decl_sptr &  f 
)

Copy a method of a union_decl into a new union_decl.

Parameters
tthe union_decl into which the method is to be copied.
methodthe method to copy into t.
Returns
the resulting newly copied method.

Definition at line 27270 of file abg-ir.cc.

◆ data_member_has_anonymous_type() [1/3]

const class_or_union_sptr data_member_has_anonymous_type ( const var_decl d)

Test if a data member has annonymous type or not.

Parameters
dthe data member to consider.
Returns
the anonymous class or union type iff turns out to have an anonymous type. Otherwise, returns nil.

Definition at line 6058 of file abg-ir.cc.

◆ data_member_has_anonymous_type() [2/3]

const class_or_union_sptr data_member_has_anonymous_type ( const var_decl d)

Test if a data member has annonymous type or not.

Parameters
dthe data member to consider.
Returns
the anonymous class or union type iff turns out to have an anonymous type. Otherwise, returns nil.

Definition at line 6075 of file abg-ir.cc.

◆ data_member_has_anonymous_type() [3/3]

const class_or_union_sptr data_member_has_anonymous_type ( const var_decl_sptr d)

Test if a data member has annonymous type or not.

Parameters
dthe data member to consider.
Returns
the anonymous class or union type iff turns out to have an anonymous type. Otherwise, returns nil.

Definition at line 6089 of file abg-ir.cc.

◆ debug() [1/3]

decl_base * debug ( const decl_base artifact)

Emit a textual representation of an artifact to std error stream for debugging purposes.

This is useful to invoke from within a command line debugger like GDB to help make sense of a given ABI artifact.

Parameters
artifactthe ABI artifact to emit the debugging representation for.
Returns
the artifact artifact.

Definition at line 10125 of file abg-ir.cc.

◆ debug() [2/3]

type_base * debug ( const type_base artifact)

Emit a textual representation of an artifact to std error stream for debugging purposes.

This is useful to invoke from within a command line debugger like GDB to help make sense of a given ABI artifact.

Parameters
artifactthe ABI artifact to emit the debugging representation for.
Returns
the artifact artifact.

Definition at line 10108 of file abg-ir.cc.

◆ debug() [3/3]

type_or_decl_base * debug ( const type_or_decl_base artifact)

Emit a textual representation of an artifact to std error stream for debugging purposes.

This is useful to invoke from within a command line debugger like GDB to help make sense of a given ABI artifact.

Parameters
artifactthe ABI artifact to emit the debugging representation for.
Returns
the artifact artifact.

Definition at line 10091 of file abg-ir.cc.

◆ debug_comp_stack()

void debug_comp_stack ( const environment env)

Emit a trace of the two comparison operands stack on the standard error stream.

Parameters
envthe environment the comparison operands stack belong to.

Definition at line 10192 of file abg-ir.cc.

◆ debug_equals()

bool debug_equals ( const type_or_decl_base l,
const type_or_decl_base r 
)

Test if two ABI artifacts are equal.

This can be useful when used from the command line of a debugger like GDB.

Parameters
lthe first ABI artifact to consider in the comparison.
rthe second ABI artifact to consider in the comparison.
Returns
true iff l equals r.

Definition at line 10142 of file abg-ir.cc.

◆ decl_name_changed() [1/2]

bool decl_name_changed ( const type_or_decl_base a1,
const type_or_decl_base a2 
)

Test if two decls have different names.

Note that this function takes into account decls whose names are relevant from an ABI standpoint. For instance, function parameter names are not relevant in that context.

Parameters
d1the first declaration to consider.
d2the second declaration to consider.
Returns
true if d1 and d2 have different names.

Definition at line 29589 of file abg-ir.cc.

◆ decl_name_changed() [2/2]

bool decl_name_changed ( const type_or_decl_base_sptr d1,
const type_or_decl_base_sptr d2 
)

Test if two decls have different names.

Parameters
d1the first declaration to consider.
d2the second declaration to consider.
Returns
true if d1 and d2 have different names.

Definition at line 29619 of file abg-ir.cc.

◆ demangle_cplus_mangled_name()

string demangle_cplus_mangled_name ( const string &  mangled_name)

Demangle a C++ mangled name and return the resulting string.

Parameters
mangled_namethe C++ mangled name to demangle.
Returns
the resulting mangled name.

Definition at line 15354 of file abg-ir.cc.

◆ do_hash_value() [1/3]

hash_t do_hash_value ( const shared_ptr< T > &  tod)

Compute the hash value of an IR node and return it.

Note that if the IR node is a non-canonicalizeable type, no hash value is computed and an empty hash is returned. Also, if the IR node already has a hash value, then this function just returns it.

This is a sub-routine of the internal hashing functions defined in abg-hash.cc

Parameters
todthe IR node to compute the value for.
Returns
the computed hash value computed.

Definition at line 388 of file abg-ir-priv.h.

◆ do_hash_value() [2/3]

hash_t do_hash_value ( const T &  tod)

Compute the hash value of an IR node and return it.

Note that if the IR node is a non-canonicalizeable type, no hash value is computed and an empty hash is returned. Also, if the IR node already has a hash value, then this function just returns it.

This is a sub-routine of the internal hashing functions defined in abg-hash.cc

Parameters
todthe IR node to compute the value for.
Returns
the computed hash value computed.

Definition at line 340 of file abg-ir-priv.h.

◆ do_hash_value() [3/3]

hash_t do_hash_value ( const T *  tod)

Compute the hash value of an IR node and return it.

Note that if the IR node is a non-canonicalizeable type, no hash value is computed and an empty hash is returned. Also, if the IR node already has a hash value, then this function just returns it.

This is a sub-routine of the internal hashing functions defined in abg-hash.cc

Parameters
todthe IR node to compute the value for.
Returns
the computed hash value computed.

Definition at line 367 of file abg-ir-priv.h.

◆ elf_symbol_is_function()

bool elf_symbol_is_function ( elf_symbol::type  t)

Test if the type of an ELF symbol denotes a function symbol.

Parameters
tthe type of the ELF symbol.
Returns
true iff elf symbol type t denotes a function symbol type.

Definition at line 3145 of file abg-ir.cc.

◆ elf_symbol_is_variable()

bool elf_symbol_is_variable ( elf_symbol::type  t)

Test if the type of an ELF symbol denotes a function symbol.

Parameters
tthe type of the ELF symbol.
Returns
true iff elf symbol type t denotes a function symbol type.

Definition at line 3155 of file abg-ir.cc.

◆ elf_symbols_alias() [1/3]

bool elf_symbols_alias ( const elf_symbol s1,
const elf_symbol s2 
)

Test if two symbols alias.

Parameters
s1the first symbol to consider.
s2the second symbol to consider.
Returns
true if s1 aliases s2.

Definition at line 2867 of file abg-ir.cc.

◆ elf_symbols_alias() [2/3]

bool elf_symbols_alias ( const elf_symbol s1,
const elf_symbol s2 
)

Test if two symbols alias.

Parameters
s1the first symbol to consider.
s2the second symbol to consider.
Returns
true if s1 aliases s2.

Definition at line 2909 of file abg-ir.cc.

◆ elf_symbols_alias() [3/3]

bool elf_symbols_alias ( const elf_symbol_sptr  s1,
const elf_symbol_sptr  s2 
)

Test if two symbols alias.

Parameters
s1the first symbol to consider.
s2the second symbol to consider.
Returns
true if s1 aliases s2.

Definition at line 2926 of file abg-ir.cc.

◆ enum_has_non_name_change()

bool enum_has_non_name_change ( const enum_type_decl l,
const enum_type_decl r,
change_kind k 
)

Test if two enums differ, but not by a name change.

Parameters
lthe first enum to consider.
rthe second enum to consider.
Returns
true iff l differs from r by anything but a name change.

Definition at line 20393 of file abg-ir.cc.

◆ equals() [1/21]

bool equals ( const array_type_def l,
const array_type_def r,
change_kind k 
)

Compares two instances of array_type_def.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 19797 of file abg-ir.cc.

◆ equals() [2/21]

bool equals ( const array_type_def::subrange_type l,
const array_type_def::subrange_type r,
change_kind k 
)

Compares two isntances of array_type_def::subrange_type.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 19467 of file abg-ir.cc.

◆ equals() [3/21]

bool equals ( const class_decl l,
const class_decl r,
change_kind k 
)

Compares two instances of class_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 26028 of file abg-ir.cc.

◆ equals() [4/21]

bool equals ( const class_decl::base_spec l,
const class_decl::base_spec r,
change_kind k 
)

Compares two instances of class_decl::base_spec.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 25389 of file abg-ir.cc.

◆ equals() [5/21]

bool equals ( const class_or_union l,
const class_or_union r,
change_kind k 
)

Compares two instances of class_or_union.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff it's non-null and if the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 24531 of file abg-ir.cc.

◆ equals() [6/21]

bool equals ( const decl_base l,
const decl_base r,
change_kind k 
)

Compares two instances of decl_base.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff it's non-null and if the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

If both of the current decls have an anonymous scope then let's compare their name component by component by properly handling anonymous scopes. That's the slow path.

Otherwise, let's just compare their name, the obvious way. That's the fast path because in that case the names are interned_string and comparing them is much faster.

Definition at line 5138 of file abg-ir.cc.

◆ equals() [7/21]

bool equals ( const enum_type_decl l,
const enum_type_decl r,
change_kind k 
)

Compares two instances of enum_type_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 20579 of file abg-ir.cc.

◆ equals() [8/21]

bool equals ( const function_decl l,
const function_decl r,
change_kind k 
)

Compares two instances of function_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 23060 of file abg-ir.cc.

◆ equals() [9/21]

bool equals ( const function_decl::parameter l,
const function_decl::parameter r,
change_kind k 
)

Compares two instances of function_decl::parameter.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 23517 of file abg-ir.cc.

◆ equals() [10/21]

bool equals ( const function_type l,
const function_type r,
change_kind k 
)

Compare two function types.

In case these function types are actually method types, this function avoids comparing two parameters (of the function types) if the types of the parameters are actually the types of the classes of the method types. This prevents infinite recursion during the comparison of two classes that are structurally identical.

This is a subroutine of the equality operator of function_type.

Parameters
lhsthe first function type to consider
rhsthe second function type to consider
ka pointer to a bitfield set by the function to give information about the kind of changes carried by lhs and rhs. It is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if lhs == rhs, false otherwise.

Definition at line 22081 of file abg-ir.cc.

◆ equals() [11/21]

bool equals ( const pointer_type_def l,
const pointer_type_def r,
change_kind k 
)

Compares two instances of pointer_type_def.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 18101 of file abg-ir.cc.

◆ equals() [12/21]

bool equals ( const ptr_to_mbr_type l,
const ptr_to_mbr_type r,
change_kind k 
)

Compares two instances of ptr_to_mbr_type.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 19052 of file abg-ir.cc.

◆ equals() [13/21]

bool equals ( const qualified_type_def l,
const qualified_type_def r,
change_kind k 
)

Compares two instances of qualified_type_def.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 17604 of file abg-ir.cc.

◆ equals() [14/21]

bool equals ( const reference_type_def l,
const reference_type_def r,
change_kind k 
)

Compares two instances of reference_type_def.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 18526 of file abg-ir.cc.

◆ equals() [15/21]

bool equals ( const scope_decl l,
const scope_decl r,
change_kind k 
)

Compares two instances of scope_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 8277 of file abg-ir.cc.

◆ equals() [16/21]

bool equals ( const scope_type_decl l,
const scope_type_decl r,
change_kind k 
)

Compares two instances of scope_type_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 17201 of file abg-ir.cc.

◆ equals() [17/21]

bool equals ( const type_base l,
const type_base r,
change_kind k 
)

Compares two instances of type_base.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff is non-null and if the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 16372 of file abg-ir.cc.

◆ equals() [18/21]

bool equals ( const type_decl l,
const type_decl r,
change_kind k 
)

Compares two instances of type_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 16922 of file abg-ir.cc.

◆ equals() [19/21]

bool equals ( const typedef_decl l,
const typedef_decl r,
change_kind k 
)

Compares two instances of typedef_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 21103 of file abg-ir.cc.

◆ equals() [20/21]

bool equals ( const union_decl l,
const union_decl r,
change_kind k 
)

Compares two instances of union_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 27239 of file abg-ir.cc.

◆ equals() [21/21]

bool equals ( const var_decl l,
const var_decl r,
change_kind k 
)

Compares two instances of var_decl.

If the two intances are different, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 21561 of file abg-ir.cc.

◆ equals_modulo_cv_qualifier() [1/4]

bool equals_modulo_cv_qualifier ( const array_type_def l,
const array_type_def r 
)

Test if two array types are equals modulo CV qualifiers.

Parameters
lthe first array of the comparison.
rthe second array of the comparison.
Returns
true iff l equals r or, if they are different, the difference between the too is just a matter of CV qualifiers.

Definition at line 19850 of file abg-ir.cc.

◆ equals_modulo_cv_qualifier() [2/4]

bool equals_modulo_cv_qualifier ( const array_type_def_sptr l,
const array_type_def_sptr r 
)

Test if two array types are equals modulo CV qualifiers.

Parameters
lthe first array of the comparison.
rthe second array of the comparison.
Returns
true iff l equals r or, if they are different, the difference between the too is just a matter of CV qualifiers.

Definition at line 19894 of file abg-ir.cc.

◆ equals_modulo_cv_qualifier() [3/4]

bool equals_modulo_cv_qualifier ( const pointer_type_def l,
const pointer_type_def r 
)

Test if two pointer types are equals modulo CV qualifiers.

Parameters
lthe first pointer of the comparison.
rthe second pointer of the comparison.
Returns
true iff l equals r or, if they are different, the difference between the too is just a matter of CV qualifiers.

Definition at line 19907 of file abg-ir.cc.

◆ equals_modulo_cv_qualifier() [4/4]

bool equals_modulo_cv_qualifier ( const pointer_type_def_sptr l,
const pointer_type_def_sptr r 
)

Test if two pointer types are equals modulo CV qualifiers.

Parameters
lthe first pointer of the comparison.
rthe second pointer of the comparison.
Returns
true iff l equals r or, if they are different, the difference between the too is just a matter of CV qualifiers.

Definition at line 19947 of file abg-ir.cc.

◆ find_data_member_from_anonymous_data_member()

var_decl_sptr find_data_member_from_anonymous_data_member ( const var_decl_sptr anon_dm,
const string &  name 
)

Find a data member inside an anonymous data member.

An anonymous data member has a type which is a class or union. This function looks for a data member inside the type of that anonymous data member.

Parameters
anon_dmthe anonymous data member to consider.
namethe name of the data member to look for.

Definition at line 10608 of file abg-ir.cc.

◆ find_first_data_member_matching_regexp()

var_decl_sptr find_first_data_member_matching_regexp ( const class_or_union t,
const regex::regex_t_sptr r 
)

Find the first data member of a class or union which name matches a regular expression.

Parameters
tthe class or union to consider.
rthe regular expression to consider.
Returns
the data member matched by r or nil if none was found.

Definition at line 29044 of file abg-ir.cc.

◆ find_last_data_member_matching_regexp()

var_decl_sptr find_last_data_member_matching_regexp ( const class_or_union t,
const regex::regex_t_sptr regex 
)

Find the last data member of a class or union which name matches a regular expression.

Parameters
tthe class or union to consider.
rthe regular expression to consider.
Returns
the data member matched by r or nil if none was found.

Definition at line 29065 of file abg-ir.cc.

◆ fixup_virtual_member_function()

void fixup_virtual_member_function ( method_decl_sptr  method)

When a virtual member function has seen its virtualness set by set_member_function_is_virtual(), this function ensures that the member function is added to the specific vectors and maps of virtual member function of its class.

Parameters
methodthe method to fixup.

Definition at line 25814 of file abg-ir.cc.

◆ fns_to_str()

void fns_to_str ( vector< function_decl * >::const_iterator  a_begin,
vector< function_decl * >::const_iterator  a_end,
vector< function_decl * >::const_iterator  b_begin,
vector< function_decl * >::const_iterator  b_end,
std::ostream &  o 
)

For each sequence of functions given in argument, generate a sequence of string that matches a given sequence of function. In the resulting sequence, each function is "uniquely representated" by a string. For instance, if the same function "foo" appears at indexes 1 and 3, then the same string 'schmurf' (okay, we don't care about the actual string) would appear at index 1 and 3.

Parameters
a_beginthe beginning of the sequence of functions to consider.
a_endthe end of the sequence of functions. This points to one-passed-the-end of the actual sequence.
b_beginthe beginning of the second sequence of functions to consider.
b_endthe end of the second sequence of functions.
othe output stream where to emit the generated list of strings to.

Definition at line 30475 of file abg-ir.cc.

◆ fqn_to_components()

void fqn_to_components ( const string &  fqn,
list< string > &  comps 
)

Decompose a fully qualified name into the list of its components.

Parameters
fqnthe fully qualified name to decompose.
compsthe resulting list of component to fill.

Definition at line 12235 of file abg-ir.cc.

◆ function_decl_is_less_than()

bool function_decl_is_less_than ( const function_decl f,
const function_decl s 
)

Test if the pretty representation of a given function_decl is lexicographically less then the pretty representation of another function_decl.

Parameters
fthe first function_decl to consider for comparison.
sthe second function_decl to consider for comparison.
Returns
true iff the pretty representation of f is lexicographically less than the pretty representation of s.

Definition at line 28651 of file abg-ir.cc.

◆ function_decls_alias()

bool function_decls_alias ( const function_decl f1,
const function_decl f2 
)

Test if two function declarations are aliases.

Two functions declarations are aliases if their symbols are aliases, in the ELF sense.

Parameters
f1the first function to consider.
f2the second function to consider.
Returns
true iff f1 is an alias of f2

Definition at line 23279 of file abg-ir.cc.

◆ get_absolute_data_member_offset() [1/2]

uint64_t get_absolute_data_member_offset ( const var_decl m)

Get the absolute offset of a data member.

If the data member is part of an anonymous data member then this returns the absolute offset – relative to the beginning of the containing class of the anonymous data member.

Parameters
mthe data member to consider.
Returns
the aboslute offset of the data member m.

Definition at line 6273 of file abg-ir.cc.

◆ get_absolute_data_member_offset() [2/2]

uint64_t get_absolute_data_member_offset ( const var_decl_sptr m)

Get the absolute offset of a data member.

If the data member is part of an anonymous data member then this returns the absolute offset – relative to the beginning of the containing class of the anonymous data member.

Parameters
mthe data member to consider.
Returns
the aboslute offset of the data member m.

Definition at line 6303 of file abg-ir.cc.

◆ get_artificial_or_natural_location()

const location & get_artificial_or_natural_location ( const decl_base decl)

Get the artificial location of a decl.

If the decl doesn't have an artificial location then return its natural one.

Parameters
declthe decl to consider.
Returns
the artificial location decl if it has one; otherwise, return its natural one.

Definition at line 10071 of file abg-ir.cc.

◆ get_canonical_type_index() [1/3]

size_t get_canonical_type_index ( const type_base t)

Getter of the canonical type index of a given type.

Parameters
tthe type to consider.
Returns
the CTI of the type.

Definition at line 345 of file abg-ir.cc.

◆ get_canonical_type_index() [2/3]

size_t get_canonical_type_index ( const type_base t)

Getter of the canonical type index of a given type.

Parameters
tthe type to consider.
Returns
the CTI of the type.

Definition at line 354 of file abg-ir.cc.

◆ get_canonical_type_index() [3/3]

size_t get_canonical_type_index ( const type_base_sptr &  t)

Getter of the canonical type index of a given type.

Parameters
tthe type to consider.
Returns
the CTI of the type.

Definition at line 363 of file abg-ir.cc.

◆ get_class_or_enum_flat_representation()

string get_class_or_enum_flat_representation ( const type_base coe,
const string &  indent,
bool  one_line,
bool  internal,
bool  qualified_name 
)

Get the flat representation of an instance of enum_type_decl type.

The flat representation of a given enum_type_decl type is the actual definition of the type, for instance:

enum {E_0 =0, E_1 = 1}

Parameters
enum_typethe enum type to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
qualified_namesuse qualified names when applicable. Typically, if this is true, the name of the enum is going to be qualified.
Returns
the resulting flat representation.

Definition at line 9805 of file abg-ir.cc.

◆ get_class_or_union_flat_representation() [1/3]

string get_class_or_union_flat_representation ( const class_or_union cou,
const string &  indent,
bool  one_line,
bool  internal,
bool  qualified_names 
)

Get the flat representation of an instance of class_or_union type.

The flat representation of a given class_or_union type is the actual definition of the type, for instance:

struct foo {int a; char b;}

Parameters
couthe instance of class_or_union to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
Returns
the resulting flat representation.

Definition at line 9508 of file abg-ir.cc.

◆ get_class_or_union_flat_representation() [2/3]

string get_class_or_union_flat_representation ( const class_or_union cou,
const string &  indent,
bool  one_line,
bool  internal,
bool  qualified_names 
)

Get the flat representation of an instance of class_or_union type.

The flat representation of a given class_or_union type is the actual definition of the type, for instance:

struct foo {int a; char b;}

Parameters
couthe instance of class_or_union to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
Returns
the resulting flat representation.

Definition at line 9623 of file abg-ir.cc.

◆ get_class_or_union_flat_representation() [3/3]

string get_class_or_union_flat_representation ( const class_or_union_sptr &  cou,
const string &  indent,
bool  one_line,
bool  internal,
bool  qualified_names 
)

Get the flat representation of an instance of class_or_union type.

The flat representation of a given class_or_union type is the actual definition of the type, for instance:

struct foo {int a; char b;}

Parameters
couthe instance of class_or_union to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
Returns
the resulting flat representation.

Definition at line 9652 of file abg-ir.cc.

◆ get_data_member() [1/2]

var_decl_sptr get_data_member ( class_or_union clazz,
const char *  member_name 
)

Get a given data member, referred to by its name, of a class type.

Parameters
clazzthe class to consider.
member_namename of the data member to get.
Returns
the resulting data member or nullptr if none was found.

Definition at line 10024 of file abg-ir.cc.

◆ get_data_member() [2/2]

var_decl_sptr get_data_member ( type_base clazz,
const char *  member_name 
)

Get a given data member, referred to by its name, of a class type.

Parameters
clazzthe class to consider.
member_namename of the data member to get.
Returns
the resulting data member or nullptr if none was found.

Definition at line 10039 of file abg-ir.cc.

◆ get_data_member_is_laid_out() [1/2]

bool get_data_member_is_laid_out ( const var_decl m)

Test whether a data member is laid out.

Parameters
mthe data member to consider.
Returns
true if m is laid out, false otherwise.

Definition at line 6344 of file abg-ir.cc.

◆ get_data_member_is_laid_out() [2/2]

bool get_data_member_is_laid_out ( const var_decl_sptr  m)

Test whether a data member is laid out.

Parameters
mthe data member to consider.
Returns
true if m is laid out, false otherwise.

Definition at line 6359 of file abg-ir.cc.

◆ get_data_member_offset() [1/3]

uint64_t get_data_member_offset ( const decl_base_sptr  d)

Get the offset of a data member.

Parameters
mthe data member to consider.
Returns
the offset (in bits) of m in its containing class.

Definition at line 6208 of file abg-ir.cc.

◆ get_data_member_offset() [2/3]

uint64_t get_data_member_offset ( const var_decl m)

Get the offset of a data member.

Parameters
mthe data member to consider.
Returns
the offset (in bits) of m in its containing class.

Definition at line 6184 of file abg-ir.cc.

◆ get_data_member_offset() [3/3]

uint64_t get_data_member_offset ( const var_decl_sptr  m)

Get the offset of a data member.

Parameters
mthe data member to consider.
Returns
the offset (in bits) of m in its containing class.

Definition at line 6199 of file abg-ir.cc.

◆ get_debug_representation()

string get_debug_representation ( const type_or_decl_base artifact)

Get the textual representation of a type for debugging purposes.

If the type is a class/union, this shows the data members, virtual member functions, size, pointer value of its canonical type, etc. Otherwise, this just shows the name of the artifact as returned by type_or_decl_base:get_pretty_representation().

Parameters
artifactthe artifact to show a debugging representation of.
Returns
a debugging string representation of artifact.

Definition at line 9833 of file abg-ir.cc.

◆ get_enum_flat_representation() [1/3]

string get_enum_flat_representation ( const enum_type_decl enum_type,
const string &  indent,
bool  one_line,
bool  qualified_names 
)

Get the flat representation of an instance of enum_type_decl type.

The flat representation of a given enum_type_decl type is the actual definition of the type, for instance:

enum {E_0 =0, E_1 = 1}

Parameters
enum_typethe enum type to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
qualified_namesuse qualified names when applicable. Typically, if this is true, the name of the enum is going to be qualified.
Returns
the resulting flat representation.

Definition at line 9684 of file abg-ir.cc.

◆ get_enum_flat_representation() [2/3]

string get_enum_flat_representation ( const enum_type_decl enum_type,
const string &  indent,
bool  one_line,
bool  qualified_names 
)

Get the flat representation of an instance of enum_type_decl type.

The flat representation of a given enum_type_decl type is the actual definition of the type, for instance:

enum {E_0 =0, E_1 = 1}

Parameters
enum_typethe enum type to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
qualified_namesuse qualified names when applicable. Typically, if this is true, the name of the enum is going to be qualified.
Returns
the resulting flat representation.

Definition at line 9743 of file abg-ir.cc.

◆ get_enum_flat_representation() [3/3]

string get_enum_flat_representation ( const enum_type_decl_sptr enum_type,
const string &  indent,
bool  one_line,
bool  qualified_names 
)

Get the flat representation of an instance of enum_type_decl type.

The flat representation of a given enum_type_decl type is the actual definition of the type, for instance:

enum {E_0 =0, E_1 = 1}

Parameters
enum_typethe enum type to consider.
indentthe identation spaces to use in the representation.
one_lineif true, then the flat representation stands on one line. Otherwise, it stands on multiple lines.
qualified_namesuse qualified names when applicable. Typically, if this is true, the name of the enum is going to be qualified.
Returns
the resulting flat representation.

Definition at line 9775 of file abg-ir.cc.

◆ get_exemplar_type()

type_base * get_exemplar_type ( const type_base type)

For a given type, return its exemplar type.

For a given type, its exemplar type is either its canonical type or the canonical type of the definition type of a given declaration-only type. If the neither of those two types exist, then the exemplar type is the given type itself.

Parameters
typethe input to consider.
Returns
the exemplar type.

Definition at line 28559 of file abg-ir.cc.

◆ get_first_non_anonymous_data_member()

const var_decl_sptr get_first_non_anonymous_data_member ( const var_decl_sptr  anon_dm)

Get the first non-anonymous data member of a given anonymous data member.

E.g:

struct S { union // <– for this anonymous data member, the function // returns a. { int a; charb; }; };

Returns
anon_dm the anonymous data member to consider.
the first non-anonymous data member of anon_dm. If no data member was found then this function returns anon_dm.

Definition at line 5718 of file abg-ir.cc.

◆ get_function_id_or_pretty_representation()

interned_string get_function_id_or_pretty_representation ( const function_decl fn)

Get the ID of a function, or, if the ID can designate several different functions, get its pretty representation.

Parameters
fnthe function to consider
Returns
the function ID of pretty representation of fn.

Definition at line 9180 of file abg-ir.cc.

◆ get_function_parameter()

const function_decl::parameter * get_function_parameter ( const decl_base fun,
unsigned  parm_index 
)

Get the function parameter designated by its index.

Note that the first function parameter has index 0.

Parameters
funthe function to consider.
parm_indexthe index of the function parameter to get.
Returns
the function parameter designated by its index, of NULL if no function parameter with that index was found.

Definition at line 28997 of file abg-ir.cc.

◆ get_function_type_name() [1/3]

interned_string get_function_type_name ( const function_type fn_type,
bool  internal 
)

Get the name of a given function type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9155 of file abg-ir.cc.

◆ get_function_type_name() [2/3]

interned_string get_function_type_name ( const function_type fn_type,
bool  internal 
)

Get the name of a given function type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9133 of file abg-ir.cc.

◆ get_function_type_name() [3/3]

interned_string get_function_type_name ( const function_type_sptr fn_type,
bool  internal 
)

Get the name of a given function type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9118 of file abg-ir.cc.

◆ get_global_scope() [1/3]

const global_scope * get_global_scope ( const decl_base decl)

return the global scope as seen by a given declaration.

Parameters
declthe declaration to consider.
Returns
the global scope of the decl, or a null pointer if the decl is not yet added to a translation_unit.

Definition at line 8543 of file abg-ir.cc.

◆ get_global_scope() [2/3]

const global_scope * get_global_scope ( const decl_base decl)

return the global scope as seen by a given declaration.

Parameters
declthe declaration to consider.
Returns
the global scope of the decl, or a null pointer if the decl is not yet added to a translation_unit.

Definition at line 8562 of file abg-ir.cc.

◆ get_global_scope() [3/3]

const global_scope * get_global_scope ( const shared_ptr< decl_base decl)

Return the global scope as seen by a given declaration.

Parameters
declthe declaration to consider.
Returns
the global scope of the decl, or a null pointer if the decl is not yet added to a translation_unit.

Definition at line 8572 of file abg-ir.cc.

◆ get_last_data_member() [1/3]

var_decl_sptr get_last_data_member ( const class_or_union klass)

Get the last data member of a class type.

Parameters
klassthe class type to consider.

Definition at line 5781 of file abg-ir.cc.

◆ get_last_data_member() [2/3]

var_decl_sptr get_last_data_member ( const class_or_union klass)

Get the last data member of a class type.

Parameters
klassthe class type to consider.

Definition at line 5788 of file abg-ir.cc.

◆ get_last_data_member() [3/3]

var_decl_sptr get_last_data_member ( const class_or_union_sptr &  klass)

Get the last data member of a class type.

Parameters
klassthe class type to consider.

Definition at line 5795 of file abg-ir.cc.

◆ get_location() [1/2]

location get_location ( const decl_base_sptr &  decl)

Get the location of a given declaration.

Parameters
declthe declaration to consider.
Returns
the location of the declaration decl.

Definition at line 8779 of file abg-ir.cc.

◆ get_location() [2/2]

location get_location ( const type_base_sptr &  type)

Get the location of the declaration of a given type.

Parameters
typethe type to consider.
Returns
the location of the declaration of type type.

Definition at line 8766 of file abg-ir.cc.

◆ get_member_access_specifier() [1/2]

enum access_specifier get_member_access_specifier ( const decl_base d)

Gets the access specifier for a class member.

Parameters
dthe declaration of the class member to consider. Note that this must be a class member otherwise the function aborts the current process.
Returns
the access specifier for the class member d.

Definition at line 5515 of file abg-ir.cc.

◆ get_member_access_specifier() [2/2]

enum access_specifier get_member_access_specifier ( const decl_base_sptr &  d)

Gets the access specifier for a class member.

Parameters
dthe declaration of the class member to consider. Note that this must be a class member otherwise the function aborts the current process.
Returns
the access specifier for the class member d.

Definition at line 5533 of file abg-ir.cc.

◆ get_member_function_is_const() [1/2]

bool get_member_function_is_const ( const function_decl f)

Test whether a member function is const.

Parameters
fthe function to test.
Returns
true if f is const, false otherwise.

Definition at line 6510 of file abg-ir.cc.

◆ get_member_function_is_const() [2/2]

bool get_member_function_is_const ( const function_decl_sptr f)

Test whether a member function is const.

Parameters
fthe function to test.
Returns
true if f is const, false otherwise.

Definition at line 6529 of file abg-ir.cc.

◆ get_member_function_is_ctor() [1/2]

bool get_member_function_is_ctor ( const function_decl f)

Test whether a member function is a constructor.

Parameters
fthe member function to test.
Returns
true if f is a constructor, false otherwise.

Definition at line 6395 of file abg-ir.cc.

◆ get_member_function_is_ctor() [2/2]

bool get_member_function_is_ctor ( const function_decl_sptr f)

Test whether a member function is a constructor.

Parameters
fthe member function to test.
Returns
true if f is a constructor, false otherwise.

Definition at line 6414 of file abg-ir.cc.

◆ get_member_function_is_dtor() [1/2]

bool get_member_function_is_dtor ( const function_decl f)

Test whether a member function is a destructor.

Parameters
fthe function to test.
Returns
true if f is a destructor, false otherwise.

Definition at line 6454 of file abg-ir.cc.

◆ get_member_function_is_dtor() [2/2]

bool get_member_function_is_dtor ( const function_decl_sptr f)

Test whether a member function is a destructor.

Parameters
fthe function to test.
Returns
true if f is a destructor, false otherwise.

Definition at line 6473 of file abg-ir.cc.

◆ get_member_function_is_virtual() [1/3]

bool get_member_function_is_virtual ( const function_decl f)

Test if a given member function is virtual.

Parameters
mem_fnthe member function to consider.
Returns
true iff a mem_fn is virtual.

Definition at line 6641 of file abg-ir.cc.

◆ get_member_function_is_virtual() [2/3]

bool get_member_function_is_virtual ( const function_decl mem_fn)

Test if a given member function is virtual.

Parameters
mem_fnthe member function to consider.
Returns
true iff a mem_fn is virtual.

Definition at line 6670 of file abg-ir.cc.

◆ get_member_function_is_virtual() [3/3]

bool get_member_function_is_virtual ( const function_decl_sptr mem_fn)

Test if a given member function is virtual.

Parameters
mem_fnthe member function to consider.
Returns
true iff a mem_fn is virtual.

Definition at line 6661 of file abg-ir.cc.

◆ get_member_function_vtable_offset() [1/2]

ssize_t get_member_function_vtable_offset ( const function_decl f)

Get the vtable offset of a member function.

Parameters
fthe member function to consider.
Returns
the vtable offset of f. Note that a vtable offset of value -1 means that the member function does *NOT* yet have a vtable offset associated to it.

Definition at line 6578 of file abg-ir.cc.

◆ get_member_function_vtable_offset() [2/2]

ssize_t get_member_function_vtable_offset ( const function_decl_sptr f)

Get the vtable offset of a member function.

Parameters
fthe member function to consider.
Returns
the vtable offset of f. Note that a vtable offset of value -1 means that the member function does *NOT* yet have a vtable offset associated to it.

Definition at line 6600 of file abg-ir.cc.

◆ get_member_is_static() [1/3]

bool get_member_is_static ( const decl_base d)

Gets a flag saying if a class member is static or not.

Parameters
dthe declaration for the class member to consider. Note that this must be a class member otherwise the function aborts the current process.
Returns
true if the class member d is static, false otherwise.

Definition at line 5575 of file abg-ir.cc.

◆ get_member_is_static() [2/3]

bool get_member_is_static ( const decl_base d)

Gets a flag saying if a class member is static or not.

Parameters
dthe declaration for the class member to consider. Note that this must be a class member otherwise the function aborts the current process.
Returns
true if the class member d is static, false otherwise.

Definition at line 5593 of file abg-ir.cc.

◆ get_member_is_static() [3/3]

bool get_member_is_static ( const decl_base_sptr &  d)

Gets a flag saying if a class member is static or not.

Parameters
dthe declaration for the class member to consider. Note that this must be a class member otherwise the function aborts the current process.
Returns
true if the class member d is static, false otherwise.

Definition at line 5604 of file abg-ir.cc.

◆ get_method_type_name() [1/3]

interned_string get_method_type_name ( const method_type fn_type,
bool  internal 
)

Get the name of a given method type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9243 of file abg-ir.cc.

◆ get_method_type_name() [2/3]

interned_string get_method_type_name ( const method_type fn_type,
bool  internal 
)

Get the name of a given method type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9223 of file abg-ir.cc.

◆ get_method_type_name() [3/3]

interned_string get_method_type_name ( const method_type_sptr  fn_type,
bool  internal 
)

Get the name of a given method type and return a copy of it.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the function type name

Definition at line 9208 of file abg-ir.cc.

◆ get_name() [1/2]

string get_name ( const type_or_decl_base tod,
bool  qualified 
)

Build and return a copy of the name of an ABI artifact that is either a type or a decl.

Parameters
todthe ABI artifact to get the name for.
qualifiedif yes, return the qualified name of tod; otherwise, return the non-qualified name;
Returns
the name of tod.

Definition at line 8686 of file abg-ir.cc.

◆ get_name() [2/2]

string get_name ( const type_or_decl_base_sptr tod,
bool  qualified 
)

Build and return a copy of the name of an ABI artifact that is either a type of a decl.

Parameters
todthe ABI artifact to get the name for.
qualifiedif yes, return the qualified name of tod; otherwise, return the non-qualified name;
Returns
the name of tod.

Definition at line 8718 of file abg-ir.cc.

◆ get_name_of_pointer_to_type()

interned_string get_name_of_pointer_to_type ( const type_base pointed_to_type,
bool  qualified,
bool  internal 
)

Get the name of the pointer to a given type.

Parameters
pointed_to_typethe pointed-to-type to consider.
qualifiedthis is true if the resulting name should be of a pointer to a *fully-qualified* pointed-to-type.
internaltrue if the name is for libabigail-internal purposes.
Returns
the name (string representation) of the pointer.

Definition at line 9019 of file abg-ir.cc.

◆ get_name_of_qualified_type()

interned_string get_name_of_qualified_type ( const type_base_sptr &  underlying_type,
qualified_type_def::CV  quals,
bool  qualified,
bool  internal 
)

Get the name of a qualified type, given the underlying type and its qualifiers.

Parameters
underlying_typethe underlying type to consider.
qualsthe CV qualifiers of the name.
qualifiedtrue if we should consider the fully qualified name of underlying_type.
internaltrue if the result is to be used for libabigail-internal purposes.
Returns
the name (string representation) of the qualified type.

Definition at line 9071 of file abg-ir.cc.

◆ get_name_of_reference_to_type()

interned_string get_name_of_reference_to_type ( const type_base pointed_to_type,
bool  lvalue_reference,
bool  qualified,
bool  internal 
)

Get the name of the reference to a given type.

Parameters
pointed_to_typethe pointed-to-type to consider.
qualifiedthis is true if the resulting name should be of a reference to a *fully-qualified* pointed-to-type.
internaltrue if the name is for libabigail-internal purposes.
Returns
the name (string representation) of the reference.

Definition at line 9041 of file abg-ir.cc.

◆ get_natural_or_artificial_location()

const location & get_natural_or_artificial_location ( const decl_base decl)

Get the non-artificial (natural) location of a decl.

If the decl doesn't have a natural location then return its artificial one.

Parameters
declthe decl to consider.
Returns
the natural location decl if it has one; otherwise, return its artificial one.

Definition at line 10052 of file abg-ir.cc.

◆ get_next_data_member() [1/2]

const var_decl_sptr get_next_data_member ( const class_or_union klass,
const var_decl_sptr data_member 
)

In the context of a given class or union, this function returns the data member that is located after a given data member.

Parameters
klassthe class or union to consider.
thedata member to consider.
Returns
the data member that is located right after data_member.

Definition at line 5742 of file abg-ir.cc.

◆ get_next_data_member() [2/2]

const var_decl_sptr get_next_data_member ( const class_or_union_sptr &  klass,
const var_decl_sptr data_member 
)

In the context of a given class or union, this function returns the data member that is located after a given data member.

Parameters
klassthe class or union to consider.
thedata member to consider.
Returns
the data member that is located right after data_member.

Definition at line 5773 of file abg-ir.cc.

◆ get_next_data_member_offset() [1/2]

bool get_next_data_member_offset ( const class_or_union klass,
const var_decl_sptr dm,
uint64_t &  offset 
)

Get the offset of the non-static data member that comes after a given one.

If there is no data member after after the one given to this function (maybe because the given one is the last data member of the class type) then the function return false.

Parameters
klassthe class to consider.
dmthe data member before the one we want to retrieve.
offsetout parameter. This parameter is set by the function to the offset of the data member that comes right after the data member dm, iff the function returns true.
Returns
true iff the data member coming right after dm was found.

Definition at line 6229 of file abg-ir.cc.

◆ get_next_data_member_offset() [2/2]

bool get_next_data_member_offset ( const class_or_union_sptr &  klass,
const var_decl_sptr dm,
uint64_t &  offset 
)

Get the offset of the non-static data member that comes after a given one.

If there is no data member after after the one given to this function (maybe because the given one is the last data member of the class type) then the function return false.

Parameters
klassthe class to consider.
dmthe data member before the one we want to retrieve.
offsetout parameter. This parameter is set by the function to the offset of the data member that comes right after the data member dm, iff the function returns true.
Returns
true iff the data member coming right after dm was found.

Definition at line 6258 of file abg-ir.cc.

◆ get_node_name() [1/3]

const interned_string & get_node_name ( class_decl_sptr  node)

Gets the name of a class_decl node.

Parameters
nodethe decl_base node to get the name from.
Returns
the name of the node.

Definition at line 12931 of file abg-ir.cc.

◆ get_node_name() [2/3]

const interned_string & get_node_name ( type_base_sptr  node)

Gets the name of a type_base node.

Parameters
nodethe type_base node to get the name from.
Returns
the name of the node.

Definition at line 12941 of file abg-ir.cc.

◆ get_node_name() [3/3]

const interned_string & get_node_name ( var_decl_sptr  node)

Gets the name of a var_decl node.

Parameters
nodethe var_decl node to get the name from.
Returns
the name of the node.

Definition at line 12951 of file abg-ir.cc.

◆ get_pretty_representation() [1/12]

string get_pretty_representation ( const decl_base d,
bool  internal 
)

Get a copy of the pretty representation of a decl.

Parameters
dthe decl to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the pretty representation of the decl.

Definition at line 9328 of file abg-ir.cc.

◆ get_pretty_representation() [2/12]

string get_pretty_representation ( const decl_base_sptr &  d,
bool  internal 
)

Get a copy of the pretty representation of a decl.

Parameters
dthe decl to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the pretty representation of the decl.

Definition at line 9369 of file abg-ir.cc.

◆ get_pretty_representation() [3/12]

string get_pretty_representation ( const function_type fn_type,
bool  internal 
)

Get the pretty representation of a function type.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the function type.

Definition at line 9434 of file abg-ir.cc.

◆ get_pretty_representation() [4/12]

string get_pretty_representation ( const function_type fn_type,
bool  internal 
)

Get the pretty representation of a function type.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the function type.

Definition at line 9412 of file abg-ir.cc.

◆ get_pretty_representation() [5/12]

string get_pretty_representation ( const function_type_sptr fn_type,
bool  internal 
)

Get the pretty representation of a function type.

Parameters
fn_typethe function type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the function type.

Definition at line 9397 of file abg-ir.cc.

◆ get_pretty_representation() [6/12]

string get_pretty_representation ( const method_type method,
bool  internal 
)

Get the pretty representation of a method type.

Parameters
methodthe method type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the method type.

Definition at line 9452 of file abg-ir.cc.

◆ get_pretty_representation() [7/12]

string get_pretty_representation ( const method_type method,
bool  internal 
)

Get the pretty representation of a method type.

Parameters
methodthe method type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the method type.

Definition at line 9470 of file abg-ir.cc.

◆ get_pretty_representation() [8/12]

string get_pretty_representation ( const method_type_sptr  method,
bool  internal 
)

Get the pretty representation of a method type.

Parameters
methodthe method type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the string represenation of the method type.

Definition at line 9488 of file abg-ir.cc.

◆ get_pretty_representation() [9/12]

string get_pretty_representation ( const type_base t,
bool  internal 
)

Get a copy of the pretty representation of a type.

Parameters
dthe type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the pretty representation of the type.

Definition at line 9346 of file abg-ir.cc.

◆ get_pretty_representation() [10/12]

string get_pretty_representation ( const type_base_sptr &  t,
bool  internal 
)

Get a copy of the pretty representation of a type.

Parameters
dthe type to consider.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the pretty representation of the type.

Definition at line 9383 of file abg-ir.cc.

◆ get_pretty_representation() [11/12]

string get_pretty_representation ( const type_or_decl_base tod,
bool  internal 
)

Build and return a copy of the pretty representation of an ABI artifact that could be either a type of a decl.

param tod the ABI artifact to consider.

Parameters
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the pretty representation of an ABI artifact that could be either a type of a decl.

Definition at line 9286 of file abg-ir.cc.

◆ get_pretty_representation() [12/12]

string get_pretty_representation ( const type_or_decl_base_sptr tod,
bool  internal 
)

Build and return a copy of the pretty representation of an ABI artifact that could be either a type of a decl.

param tod the ABI artifact to consider.

Parameters
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the pretty representation of an ABI artifact that could be either a type of a decl.

Definition at line 9314 of file abg-ir.cc.

◆ get_string_representation_of_cv_quals()

string get_string_representation_of_cv_quals ( const qualified_type_def::CV  cv_quals)

Get the string representation of a CV qualifier bitmap.

Parameters
cv_qualsthe bitmap of CV qualifiers to consider.
Returns
the string representation.

Definition at line 8656 of file abg-ir.cc.

◆ get_top_most_scope_under() [1/3]

const scope_decl * get_top_most_scope_under ( const decl_base decl,
const scope_decl scope 
)

Return the a scope S containing a given declaration and that is right under a given scope P.

Note that scope must come before decl in topological order.

Parameters
declthe decl for which to find a scope.
scopethe scope under which the resulting scope must be.
Returns
the resulting scope.

Definition at line 8587 of file abg-ir.cc.

◆ get_top_most_scope_under() [2/3]

const scope_decl * get_top_most_scope_under ( const decl_base_sptr  decl,
const scope_decl scope 
)

Return the a scope S containing a given declaration and that is right under a given scope P.

Parameters
declthe decl for which to find a scope.
scopethe scope under which the resulting scope must be.
Returns
the resulting scope.

Definition at line 8630 of file abg-ir.cc.

◆ get_top_most_scope_under() [3/3]

const scope_decl * get_top_most_scope_under ( const decl_base_sptr  decl,
const scope_decl_sptr  scope 
)

Return the a scope S containing a given declaration and that is right under a given scope P.

Parameters
declthe decl for which to find a scope.
scopethe scope under which the resulting scope must be.
Returns
the resulting scope.

Definition at line 8643 of file abg-ir.cc.

◆ get_translation_unit() [1/3]

translation_unit * get_translation_unit ( const type_or_decl_base t)

Return the translation unit a declaration belongs to.

Parameters
declthe declaration to consider.
Returns
the resulting translation unit, or null if the decl is not yet added to a translation unit.

Definition at line 10461 of file abg-ir.cc.

◆ get_translation_unit() [2/3]

translation_unit * get_translation_unit ( const type_or_decl_base decl)

Return the translation unit a declaration belongs to.

Parameters
declthe declaration to consider.
Returns
the resulting translation unit, or null if the decl is not yet added to a translation unit.

Definition at line 10491 of file abg-ir.cc.

◆ get_translation_unit() [3/3]

translation_unit * get_translation_unit ( const type_or_decl_base_sptr decl)

Return the translation unit a declaration belongs to.

Parameters
declthe declaration to consider.
Returns
the resulting translation unit, or null if the decl is not yet added to a translation unit.

Definition at line 10501 of file abg-ir.cc.

◆ get_type_declaration() [1/3]

const decl_base * get_type_declaration ( const type_base t)

Get the declaration for a given type.

Parameters
tthe type to consider.
Returns
the declaration for the type to return.

Definition at line 10229 of file abg-ir.cc.

◆ get_type_declaration() [2/3]

decl_base_sptr get_type_declaration ( const type_base_sptr  t)

Get the declaration for a given type.

Parameters
tthe type to consider.
Returns
the declaration for the type to return.

Definition at line 10247 of file abg-ir.cc.

◆ get_type_declaration() [3/3]

decl_base * get_type_declaration ( type_base t)

Get the declaration for a given type.

Parameters
tthe type to consider.
Returns
the declaration for the type to return.

Definition at line 10238 of file abg-ir.cc.

◆ get_type_name() [1/3]

interned_string get_type_name ( const type_base t,
bool  qualified,
bool  internal 
)

Get the name of a given type and return a copy of it.

Parameters
tthe type to consider.
qualifiedif true then return the qualified name of the type.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the type name if the type has a name, or the empty string if it does not.

Definition at line 9004 of file abg-ir.cc.

◆ get_type_name() [2/3]

interned_string get_type_name ( const type_base t,
bool  qualified,
bool  internal 
)

Get the name of a given type and return a copy of it.

Parameters
tthe type to consider.
qualifiedif true then return the qualified name of the type.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the type name if the type has a name, or the empty string if it does not.

Definition at line 8933 of file abg-ir.cc.

◆ get_type_name() [3/3]

interned_string get_type_name ( const type_base_sptr &  t,
bool  qualified,
bool  internal 
)

Get the name of a given type and return a copy of it.

Parameters
tthe type to consider.
qualifiedif true then return the qualified name of the type.
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
a copy of the type name if the type has a name, or the empty string if it does not.

Definition at line 8835 of file abg-ir.cc.

◆ get_type_scope() [1/2]

scope_decl * get_type_scope ( const type_base_sptr &  t)

Get the scope of a given type.

Parameters
tthe type to consider.
Returns
the scope of type t or 0 if the type has no scope yet.

Definition at line 8817 of file abg-ir.cc.

◆ get_type_scope() [2/2]

scope_decl * get_type_scope ( type_base t)

Get the scope of a given type.

Parameters
tthe type to consider.
Returns
the scope of type t or 0 if the type has no scope yet.

Definition at line 8800 of file abg-ir.cc.

◆ get_var_size_in_bits()

uint64_t get_var_size_in_bits ( const var_decl_sptr v)

Get the size of a given variable.

Parameters
vthe variable to consider.
Returns
the size of variable v.

Definition at line 6316 of file abg-ir.cc.

◆ has_fake_flexible_array_data_member() [1/3]

var_decl_sptr has_fake_flexible_array_data_member ( const class_decl klass)

Test if the last data member of a class is an array with one element.

An array with one element is a way to mimic the flexible data member idiom that was later standardized in C99.

To learn more about the flexible data member idiom, please consider reading : https://en.wikipedia.org/wiki/Flexible_array_member.

The various ways of representing that idiom pre-standardization are presented in this article: https://developers.redhat.com/articles/2022/09/29/benefits-limitations-flexible-array-members#

Parameters
klassthe class to consider.
Returns
the data member which type is a fake flexible array, if any, or nil.

Definition at line 11202 of file abg-ir.cc.

◆ has_fake_flexible_array_data_member() [2/3]

var_decl_sptr has_fake_flexible_array_data_member ( const class_decl klass)

Test if the last data member of a class is an array with one element.

An array with one element is a way to mimic the flexible data member idiom that was later standardized in C99.

To learn more about the flexible data member idiom, please consider reading : https://en.wikipedia.org/wiki/Flexible_array_member.

The various ways of representing that idiom pre-standardization are presented in this article: https://developers.redhat.com/articles/2022/09/29/benefits-limitations-flexible-array-members#

Parameters
klassthe class to consider.
Returns
the data member which type is a fake flexible array, if any, or nil.

Definition at line 11240 of file abg-ir.cc.

◆ has_fake_flexible_array_data_member() [3/3]

var_decl_sptr has_fake_flexible_array_data_member ( const class_decl_sptr klass)

Test if the last data member of a class is an array with one element.

An array with one element is a way to mimic the flexible data member idiom that was later standardized in C99.

To learn more about the flexible data member idiom, please consider reading : https://en.wikipedia.org/wiki/Flexible_array_member.

The various ways of representing that idiom pre-standardization are presented in this article: https://developers.redhat.com/articles/2022/09/29/benefits-limitations-flexible-array-members#

Parameters
klassthe class to consider.
Returns
the data member which type is a fake flexible array, if any, or nil.

Definition at line 11262 of file abg-ir.cc.

◆ has_flexible_array_data_member() [1/3]

var_decl_sptr has_flexible_array_data_member ( const class_decl klass)

Test if the last data member of a class is an array with non-finite data member.

The flexible data member idiom is a well known C idiom: https://en.wikipedia.org/wiki/Flexible_array_member.

Parameters
klassthe class to consider.
Returns
the data member which type is a flexible array, if any, or nil.

Definition at line 11132 of file abg-ir.cc.

◆ has_flexible_array_data_member() [2/3]

var_decl_sptr has_flexible_array_data_member ( const class_decl klass)

Test if the last data member of a class is an array with non-finite data member.

The flexible data member idiom is a well known C idiom: https://en.wikipedia.org/wiki/Flexible_array_member.

Parameters
klassthe class to consider.
Returns
the data member which type is a flexible array, if any, or nil.

Definition at line 11161 of file abg-ir.cc.

◆ has_flexible_array_data_member() [3/3]

var_decl_sptr has_flexible_array_data_member ( const class_decl_sptr klass)

Test if the last data member of a class is an array with non-finite data member.

The flexible data member idiom is a well known C idiom: https://en.wikipedia.org/wiki/Flexible_array_member.

Parameters
klassthe class to consider.
Returns
the data member which type is a flexible array, if any, or nil.

Definition at line 11180 of file abg-ir.cc.

◆ has_scope() [1/2]

bool has_scope ( const decl_base d)

Tests if a declaration has got a scope.

Parameters
dthe declaration to consider.
Returns
true if the declaration has got a scope, false otherwise.

Definition at line 5399 of file abg-ir.cc.

◆ has_scope() [2/2]

bool has_scope ( const decl_base_sptr  d)

Tests if a declaration has got a scope.

Parameters
dthe declaration to consider.
Returns
true if the declaration has got a scope, false otherwise.

Definition at line 5408 of file abg-ir.cc.

◆ hash_and_canonicalize_types()

void hash_and_canonicalize_types ( IteratorType  begin,
IteratorType  end,
deref_lambda  deref,
bool  do_log = false,
bool  show_stats = false 
)

Hash and canonicalize a sequence of types.

Note that this function first sorts the types, then hashes them and then canonicalizes them.

Operations must be done in that order to get predictable results.

Parameters
beginan iterator pointing to the first element of the sequence of types to hash and canonicalize.
beginan iterator pointing past-the-end of the sequence of types to hash and canonicalize.
derefthis is a lambda that is used to dereference the types contained in the sequence referenced by iterators begin and end.

Definition at line 1523 of file abg-ir-priv.h.

◆ hash_type()

size_t hash_type ( const type_base t)

Hash an ABI artifact that is a type.

This function intends to provides the fastest possible hashing for types while being completely correct.

Note that if the type artifact has a canonical type, the hash value is going to be the pointer value of the canonical type. Otherwise, this function computes a hash value for the type by recursively walking the type members. This last code path is possibly *very* slow and should only be used when only handful of types are going to be hashed.

Parameters
tthe type or decl to hash.
Returns
the resulting hash value.

Definition at line 28439 of file abg-ir.cc.

◆ hash_type_or_decl() [1/2]

size_t hash_type_or_decl ( const type_or_decl_base tod)

Hash an ABI artifact that is either a type or a decl.

This function intends to provides the fastest possible hashing for types and decls, while being completely correct.

Note that if the artifact is a type and if it has a canonical type, the hash value is going to be the pointer value of the canonical type. Otherwise, this function computes a hash value for the type by recursively walking the type members. This last code path is possibly *very* slow and should only be used when only handful of types are going to be hashed.

If the artifact is a decl, then a combination of the hash of its type and the hash of the other properties of the decl is computed.

Parameters
todthe type or decl to hash.
Returns
the resulting hash value.

Definition at line 28352 of file abg-ir.cc.

◆ hash_type_or_decl() [2/2]

size_t hash_type_or_decl ( const type_or_decl_base_sptr tod)

Hash an ABI artifact that is either a type of a decl.

Parameters
todthe ABI artifact to hash.
Returns
the hash value of the ABI artifact.

Definition at line 28448 of file abg-ir.cc.

◆ insert_decl_into_scope() [1/2]

decl_base_sptr insert_decl_into_scope ( decl_base_sptr  decl,
scope_decl::declarations::iterator  before,
scope_decl scope 
)

Inserts a declaration into a given scope, before a given IR child node of the scope.

Parameters
declthe declaration to insert into the scope.
beforean iterator pointing to the child IR node before which to insert the declaration.
scopethe scope into which to insert the declaration.

Definition at line 8494 of file abg-ir.cc.

◆ insert_decl_into_scope() [2/2]

decl_base_sptr insert_decl_into_scope ( decl_base_sptr  decl,
scope_decl::declarations::iterator  before,
scope_decl_sptr  scope 
)

Inserts a declaration into a given scope, before a given IR child node of the scope.

Parameters
declthe declaration to insert into the scope.
beforean iterator pointing to the child IR node before which to insert the declaration.
scopethe scope into which to insert the declaration.

Definition at line 8516 of file abg-ir.cc.

◆ integral_type_has_harmless_name_change() [1/2]

bool integral_type_has_harmless_name_change ( const decl_base_sptr &  f,
const decl_base_sptr &  s 
)

Test if a diff node carries a change whereby two integral types have different names in a harmless way.

Basically, if the integral type name change is accompanied by a size change then the change is considered harmful. If there are modifiers change, the change is considered harmful.

Definition at line 29666 of file abg-ir.cc.

◆ integral_type_has_harmless_name_change() [2/2]

bool integral_type_has_harmless_name_change ( const type_base_sptr &  f,
const type_base_sptr &  s 
)

Test if a diff node carries a change whereby two integral types have different names in a harmless way.

Basically, if the integral type name change is accompanied by a size change then the change is considered harmful. If there are modifiers change, the change is considered harmful.

Definition at line 29630 of file abg-ir.cc.

◆ is_ada_language()

bool is_ada_language ( translation_unit::language  l)

Test if a language enumerator designates the Ada language.

Parameters
lthe language enumerator to consider.
Returns
true iff l designates the Ada language.

Definition at line 1833 of file abg-ir.cc.

◆ is_anonymous_data_member() [1/8]

bool is_anonymous_data_member ( const decl_base d)

Test if a decl is an anonymous data member.

Parameters
dthe decl to consider.
Returns
true iff d is an anonymous data member.

Definition at line 5872 of file abg-ir.cc.

◆ is_anonymous_data_member() [2/8]

const var_decl * is_anonymous_data_member ( const decl_base d)

Test if a decl is an anonymous data member.

Parameters
dthe decl to consider.
Returns
a non-nil pointer to the var_decl denoted by d if it's an anonymous data member. Otherwise returns a nil pointer.

Definition at line 5899 of file abg-ir.cc.

◆ is_anonymous_data_member() [3/8]

var_decl_sptr is_anonymous_data_member ( const decl_base_sptr &  d)

Test if a decl is an anonymous data member.

Parameters
dthe decl to consider.
Returns
a non-nil pointer to the var_decl denoted by d if it's an anonymous data member. Otherwise returns a nil pointer.

Definition at line 5933 of file abg-ir.cc.

◆ is_anonymous_data_member() [4/8]

const var_decl * is_anonymous_data_member ( const type_or_decl_base d)

Test if a decl is an anonymous data member.

Parameters
dthe decl to consider.
Returns
the var_decl representing the data member iff d is an anonymous data member.

Definition at line 5882 of file abg-ir.cc.

◆ is_anonymous_data_member() [5/8]

var_decl_sptr is_anonymous_data_member ( const type_or_decl_base_sptr d)

Test if a decl is an anonymous data member.

Parameters
dthe decl to consider.
Returns
a non-nil pointer to the var_decl denoted by d if it's an anonymous data member. Otherwise returns a nil pointer.

Definition at line 5916 of file abg-ir.cc.

◆ is_anonymous_data_member() [6/8]

bool is_anonymous_data_member ( const var_decl d)

Test if a var_decl is an anonymous data member.

Parameters
dthe var_decl to consider.
Returns
true iff d is an anonymous data member.

Definition at line 5974 of file abg-ir.cc.

◆ is_anonymous_data_member() [7/8]

const var_decl * is_anonymous_data_member ( const var_decl d)

Test if a var_decl is an anonymous data member.

Parameters
dthe var_decl to consider.
Returns
a non-nil pointer to the var_decl denoted by d if it's an anonymous data member. Otherwise returns a nil pointer.

Definition at line 5961 of file abg-ir.cc.

◆ is_anonymous_data_member() [8/8]

var_decl_sptr is_anonymous_data_member ( const var_decl_sptr d)

Test if a var_decl is an anonymous data member.

Parameters
dthe var_decl to consider.
Returns
a non-nil pointer to the var_decl denoted by d if it's an anonymous data member. Otherwise returns a nil pointer.

Definition at line 5947 of file abg-ir.cc.

◆ is_anonymous_or_typedef_named()

bool is_anonymous_or_typedef_named ( const decl_base d)

Test if a given decl is anonymous or has a naming typedef.

Parameters
dthe decl to consider.
Returns
true iff d is anonymous or has a naming typedef.

Definition at line 6154 of file abg-ir.cc.

◆ is_anonymous_type() [1/2]

bool is_anonymous_type ( const type_base t)

Test whether a declaration is a type.

Parameters
dthe declaration to test for.
Returns
true if the declaration is a type, false otherwise. Test if a given type is anonymous.

Note that this function considers that an anonymous class that is named by a typedef is not anonymous anymore. This is the C idiom:

typedef struct {int member;} s_type;

The typedef s_type becomes the name of the originally anonymous struct.

Parameters
tthe type to consider.
Returns
true iff t is anonymous.

Definition at line 10816 of file abg-ir.cc.

◆ is_anonymous_type() [2/2]

bool is_anonymous_type ( const type_base_sptr &  t)

Test if a given type is anonymous.

Parameters
tthe type to consider.
Returns
true iff t is anonymous.

Definition at line 10841 of file abg-ir.cc.

◆ is_array_of_qualified_element() [1/2]

qualified_type_def_sptr is_array_of_qualified_element ( const array_type_def_sptr array)

Tests if the element of a given array is a qualified type.

Parameters
arraythe array type to consider.
Returns
the qualified element of the array iff it's a qualified type. Otherwise, return a nil object.

Definition at line 12082 of file abg-ir.cc.

◆ is_array_of_qualified_element() [2/2]

array_type_def_sptr is_array_of_qualified_element ( const type_base_sptr &  type)

Test if an array type is an array to a qualified element type.

Parameters
typethe array type to consider.
Returns
true the array type iff it's an array to a qualified element type.

Definition at line 12097 of file abg-ir.cc.

◆ is_array_type() [1/2]

array_type_def * is_array_type ( const type_or_decl_base type,
bool  look_through_qualifiers 
)

Test if a type is an array_type_def.

Parameters
typethe type to consider.
Returns
true iff type is an array_type_def.

Definition at line 12049 of file abg-ir.cc.

◆ is_array_type() [2/2]

array_type_def_sptr is_array_type ( const type_or_decl_base_sptr type,
bool  look_through_qualifiers 
)

Test if a type is an array_type_def.

Parameters
typethe type to consider.
Returns
true iff type is an array_type_def.

Definition at line 12065 of file abg-ir.cc.

◆ is_at_class_scope() [1/3]

class_or_union * is_at_class_scope ( const decl_base decl)

Tests whether a given decl is at class scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at class scope.

Definition at line 10588 of file abg-ir.cc.

◆ is_at_class_scope() [2/3]

class_or_union * is_at_class_scope ( const decl_base decl)

Tests whether a given decl is at class scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at class scope.

Definition at line 10574 of file abg-ir.cc.

◆ is_at_class_scope() [3/3]

class_or_union * is_at_class_scope ( const decl_base_sptr  decl)

Tests whether a given decl is at class scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at class scope.

Definition at line 10565 of file abg-ir.cc.

◆ is_at_global_scope() [1/3]

bool is_at_global_scope ( const decl_base decl)

Tests whether a given declaration is at global scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at global scope.

Definition at line 10538 of file abg-ir.cc.

◆ is_at_global_scope() [2/3]

bool is_at_global_scope ( const decl_base decl)

Tests whether a given declaration is at global scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at global scope.

Definition at line 10556 of file abg-ir.cc.

◆ is_at_global_scope() [3/3]

bool is_at_global_scope ( const decl_base_sptr  decl)

Tests whether a given declaration is at global scope.

Parameters
declthe decl to consider.
Returns
true iff decl is at global scope.

Definition at line 10547 of file abg-ir.cc.

◆ is_at_template_scope()

bool is_at_template_scope ( const shared_ptr< decl_base decl)

Tests whether a given decl is at template scope.

Note that only template parameters , types that are compositions, and template patterns (function or class) can be at template scope.

Parameters
declthe decl to consider.
Returns
true iff the decl is at template scope.

Definition at line 10630 of file abg-ir.cc.

◆ is_c_language()

bool is_c_language ( translation_unit::language  l)

Test if a language enumerator designates the C language.

Parameters
lthe language enumerator to consider.
Returns
true iff l designates the C language.

Definition at line 1792 of file abg-ir.cc.

◆ is_class_base_spec() [1/2]

class_decl::base_spec * is_class_base_spec ( const type_or_decl_base tod)

Test if an ABI artifact is a class base specifier.

Parameters
todthe ABI artifact to consider.
Returns
a pointer to the class_decl::base_spec sub-object of tod iff it's a class base specifier.

Definition at line 26501 of file abg-ir.cc.

◆ is_class_base_spec() [2/2]

Test if an ABI artifact is a class base specifier.

Parameters
todthe ABI artifact to consider.
Returns
a pointer to the class_decl::base_spec sub-object of tod iff it's a class base specifier.

Definition at line 26514 of file abg-ir.cc.

◆ is_class_or_union_type() [1/2]

shared_ptr< class_or_union > is_class_or_union_type ( const shared_ptr< type_or_decl_base > &  t)

Test if a type is a class_or_union.

Parameters
tthe type to consider.
Returns
the class_or_union is is a class_or_union, or nil otherwise.

Definition at line 11332 of file abg-ir.cc.

◆ is_class_or_union_type() [2/2]

class_or_union * is_class_or_union_type ( const type_or_decl_base t)

Test if a type is a class_or_union.

Parameters
tthe type to consider.
Returns
the class_or_union is is a class_or_union, or nil otherwise.

Definition at line 11322 of file abg-ir.cc.

◆ is_class_type() [1/3]

bool is_class_type ( const type_or_decl_base t)

Test whether a type is a class.

@parm t the type to consider.

Returns
true iff t is a class_decl.

Definition at line 11091 of file abg-ir.cc.

◆ is_class_type() [2/3]

class_decl * is_class_type ( const type_or_decl_base t)

Test whether a type is a class.

@parm t the type to consider.

Returns
the class_decl if t is a class_decl or null otherwise.

Definition at line 11100 of file abg-ir.cc.

◆ is_class_type() [3/3]

class_decl_sptr is_class_type ( const type_or_decl_base_sptr d)

Test whether a type is a class.

@parm t the type to consider.

Returns
the class_decl if t is a class_decl or null otherwise.

Definition at line 11118 of file abg-ir.cc.

◆ is_comparison_cycle_detected() [1/2]

bool is_comparison_cycle_detected ( const class_decl l,
const class_decl r 
)

Detect if a recursive comparison cycle is detected while structurally comparing two class_decl types.

Parameters
lthe left-hand-side operand of the current comparison.
rthe right-hand-side operand of the current comparison.
Returns
true iff a comparison cycle is detected.

Definition at line 1005 of file abg-ir.cc.

◆ is_comparison_cycle_detected() [2/2]

bool is_comparison_cycle_detected ( T &  l,
T &  r 
)

Detect if a recursive comparison cycle is detected while structurally comparing two types (a.k.a member-wise comparison).

Parameters
lthe left-hand-side operand of the current comparison.
rthe right-hand-side operand of the current comparison.
Returns
true iff a comparison cycle is detected.

Definition at line 989 of file abg-ir.cc.

◆ is_compatible_with_class_type() [1/2]

class_decl_sptr is_compatible_with_class_type ( const decl_base_sptr &  t)

Test if a type is a class. This function looks through typedefs.

@parm t the type to consider.

Returns
the class_decl if t is a class_decl or null otherwise.

Definition at line 11082 of file abg-ir.cc.

◆ is_compatible_with_class_type() [2/2]

class_decl_sptr is_compatible_with_class_type ( const type_base_sptr &  t)

Test if a type is a class. This function looks through typedefs.

@parm t the type to consider.

Returns
the class_decl if t is a class_decl or null otherwise.

Definition at line 11059 of file abg-ir.cc.

◆ is_compatible_with_enum_type() [1/2]

enum_type_decl_sptr is_compatible_with_enum_type ( const decl_base_sptr &  t)

Test if a type is an enum. This function looks through typedefs.

@parm t the type to consider.

Returns
the enum_decl if t is an enum_decl or null otherwise.

Definition at line 11032 of file abg-ir.cc.

◆ is_compatible_with_enum_type() [2/2]

enum_type_decl_sptr is_compatible_with_enum_type ( const type_base_sptr &  t)

Test if a type is an enum. This function looks through typedefs.

@parm t the type to consider.

Returns
the enum_decl if t is an enum_decl or null otherwise.

Definition at line 11008 of file abg-ir.cc.

◆ is_const_qualified_type() [1/2]

bool is_const_qualified_type ( const qualified_type_def_sptr &  t)

Test if a given qualified type is const.

@pram t the qualified type to consider.

Returns
true iff t is a const qualified type.

Definition at line 7301 of file abg-ir.cc.

◆ is_const_qualified_type() [2/2]

bool is_const_qualified_type ( const type_base_sptr &  t)

Test if a given type is const-qualified.

@pram t the type to consider.

Returns
true iff t is a const qualified type.

Definition at line 7318 of file abg-ir.cc.

◆ is_corpus_group()

corpus_group_sptr is_corpus_group ( const corpus_sptr &  corpus)

Test if a corpus is a corpus_group.

Parameters
corpusthe corpus to consider.
Returns
the corpus_group is corpus is a corpus group, or nil.

Definition at line 2277 of file abg-corpus.cc.

◆ is_cplus_plus_language()

bool is_cplus_plus_language ( translation_unit::language  l)

Test if a language enumerator designates the C++ language.

Parameters
lthe language enumerator to consider.
Returns
true iff l designates the C++ language.

Definition at line 1808 of file abg-ir.cc.

◆ is_data_member() [1/7]

var_decl * is_data_member ( const decl_base d)

Test if a decl is a data member.

Parameters
dthe decl to consider.
Returns
a pointer to the data member iff d is a data member, or a null pointer.

Definition at line 5690 of file abg-ir.cc.

◆ is_data_member() [2/7]

var_decl_sptr is_data_member ( const decl_base_sptr &  d)

Test if a decl is a data member.

Parameters
dthe decl to consider.
Returns
a pointer to the data member iff d is a data member, or a null pointer.

Definition at line 5641 of file abg-ir.cc.

◆ is_data_member() [3/7]

var_decl * is_data_member ( const type_or_decl_base d)

Test if a decl is a data member.

Parameters
dthe decl to consider.
Returns
a pointer to the data member iff d is a data member, or a null pointer.

Definition at line 5675 of file abg-ir.cc.

◆ is_data_member() [4/7]

var_decl_sptr is_data_member ( const type_or_decl_base_sptr d)

Test if a decl is a data member.

Parameters
dthe decl to consider.
Returns
a pointer to the data member iff d is a data member, or a null pointer.

Definition at line 5658 of file abg-ir.cc.

◆ is_data_member() [5/7]

bool is_data_member ( const var_decl v)

Test if a var_decl is a data member.

Parameters
vthe var_decl to consider.
Returns
true if v is data member, false otherwise.

Definition at line 5613 of file abg-ir.cc.

◆ is_data_member() [6/7]

bool is_data_member ( const var_decl v)

Test if a var_decl is a data member.

Parameters
vthe var_decl to consider.
Returns
true if v is data member, false otherwise.

Definition at line 5622 of file abg-ir.cc.

◆ is_data_member() [7/7]

bool is_data_member ( const var_decl_sptr  d)

Test if a var_decl is a data member.

Parameters
vthe var_decl to consider.
Returns
true if v is data member, false otherwise.

Definition at line 5631 of file abg-ir.cc.

◆ is_data_member_of_anonymous_class_or_union() [1/3]

bool is_data_member_of_anonymous_class_or_union ( const var_decl d)

Test if a var_decl is a data member belonging to an anonymous type.

Parameters
dthe var_decl to consider.
Returns
true iff d is a data member belonging to an anonymous type.

Definition at line 5990 of file abg-ir.cc.

◆ is_data_member_of_anonymous_class_or_union() [2/3]

bool is_data_member_of_anonymous_class_or_union ( const var_decl d)

Test if a var_decl is a data member belonging to an anonymous type.

Parameters
dthe var_decl to consider.
Returns
true iff d is a data member belonging to an anonymous type.

Definition at line 6009 of file abg-ir.cc.

◆ is_data_member_of_anonymous_class_or_union() [3/3]

bool is_data_member_of_anonymous_class_or_union ( const var_decl_sptr d)

Test if a var_decl is a data member belonging to an anonymous type.

Parameters
dthe var_decl to consider.
Returns
true iff d is a data member belonging to an anonymous type.

Definition at line 6020 of file abg-ir.cc.

◆ is_decl() [1/2]

decl_base * is_decl ( const type_or_decl_base d)

Test if an ABI artifact is a declaration.

Parameters
dthe artifact to consider.
returnthe declaration sub-object of d if it's a declaration, or NULL if it is not.

Definition at line 10705 of file abg-ir.cc.

◆ is_decl() [2/2]

decl_base_sptr is_decl ( const type_or_decl_base_sptr d)

Test if an ABI artifact is a declaration.

Parameters
dthe artifact to consider.
returnthe declaration sub-object of d if it's a declaration, or NULL if it is not.

Definition at line 10734 of file abg-ir.cc.

◆ is_decl_slow() [1/2]

decl_base * is_decl_slow ( const type_or_decl_base t)

Test if an ABI artifact is a declaration.

This is done using a slow path that uses dynamic_cast.

Parameters
dthe artifact to consider.
returnthe declaration sub-object of d if it's a

Definition at line 10745 of file abg-ir.cc.

◆ is_decl_slow() [2/2]

decl_base_sptr is_decl_slow ( const type_or_decl_base_sptr t)

Test if an ABI artifact is a declaration.

This is done using a slow path that uses dynamic_cast.

Parameters
dthe artifact to consider.
returnthe declaration sub-object of d if it's a

Definition at line 10756 of file abg-ir.cc.

◆ is_declaration_only_class_or_union_type() [1/2]

bool is_declaration_only_class_or_union_type ( const type_base t,
bool  look_through_decl_only 
)

Test wheter a type is a declaration-only class.

Parameters
tthe type to considier.
look_through_decl_onlyif true, then look through the decl-only class to see if it actually has a class definition in the same ABI corpus.
Returns
true iff t is a declaration-only class.

Definition at line 11275 of file abg-ir.cc.

◆ is_declaration_only_class_or_union_type() [2/2]

bool is_declaration_only_class_or_union_type ( const type_base_sptr &  t,
bool  look_through_decl_only 
)

Test wheter a type is a declaration-only class.

Parameters
tthe type to considier.
look_through_decl_onlyif true, then look through the decl-only class to see if it actually has a class definition in the same ABI corpus.
Returns
true iff t is a declaration-only class.

Definition at line 11297 of file abg-ir.cc.

◆ is_declaration_only_class_type()

bool is_declaration_only_class_type ( const type_base_sptr &  t,
bool  look_through_decl_only 
)

Test wheter a type is a declaration-only class.

Parameters
tthe type to considier.
look_through_decl_onlyif true, then look through the decl-only class to see if it actually has a class definition in the same ABI corpus.
Returns
true iff t is a declaration-only class.

Definition at line 11311 of file abg-ir.cc.

◆ is_enum_type() [1/2]

const enum_type_decl * is_enum_type ( const type_or_decl_base d)

Test if a decl is an enum_type_decl.

Parameters
dthe decl to test for.
Returns
the enum_type_decl* if d is an enum, nil otherwise.

Definition at line 11041 of file abg-ir.cc.

◆ is_enum_type() [2/2]

enum_type_decl_sptr is_enum_type ( const type_or_decl_base_sptr d)

Test if a decl is an enum_type_decl.

Parameters
dthe decl to test for.
Returns
the enum_type_decl_sptr if d is an enum, nil otherwise.

Definition at line 11050 of file abg-ir.cc.

◆ is_enumerator_present_in_enum()

bool is_enumerator_present_in_enum ( const enum_type_decl::enumerator enr,
const enum_type_decl enom 
)

Test if a given enumerator is found present in an enum.

This is a subroutine of the equals function for enums.

Parameters
enrthe enumerator to consider.
enomthe enum to consider.
Returns
true iff the enumerator enr is present in the enum enom.

Definition at line 20474 of file abg-ir.cc.

◆ is_function_decl() [1/3]

bool is_function_decl ( const type_or_decl_base d)

Test whether a declaration is a function_decl.

Parameters
dthe declaration to test for.
Returns
true if d is a function_decl.

Definition at line 10662 of file abg-ir.cc.

◆ is_function_decl() [2/3]

function_decl * is_function_decl ( const type_or_decl_base d)

Test whether a declaration is a function_decl.

Parameters
dthe declaration to test for.
Returns
a shared pointer to function_decl if d is a function_decl. Otherwise, a nil shared pointer.

Definition at line 10653 of file abg-ir.cc.

◆ is_function_decl() [3/3]

function_decl_sptr is_function_decl ( const type_or_decl_base_sptr d)

Test whether a declaration is a function_decl.

Parameters
dthe declaration to test for.
Returns
a shared pointer to function_decl if d is a function_decl. Otherwise, a nil shared pointer.

Definition at line 10672 of file abg-ir.cc.

◆ is_function_parameter() [1/2]

function_decl::parameter * is_function_parameter ( const type_or_decl_base tod)

Test whether a declaration is a function_decl.

Parameters
dthe declaration to test for.
Returns
a pointer to function_decl if d is a function_decl. Otherwise, a nil shared pointer.

Definition at line 10682 of file abg-ir.cc.

◆ is_function_parameter() [2/2]

function_decl::parameter_sptr is_function_parameter ( const type_or_decl_base_sptr  tod)

Test whether an ABI artifact is a function_decl.

Parameters
todthe declaration to test for.
Returns
a pointer to function_decl if d is a function_decl. Otherwise, a nil shared pointer.

Definition at line 10695 of file abg-ir.cc.

◆ is_function_template_pattern()

bool is_function_template_pattern ( const shared_ptr< decl_base decl)

Test whether a decl is the pattern of a function template.

Parameters
declthe decl to consider.
Returns
true iff decl is the pattern of a function template.

Definition at line 12036 of file abg-ir.cc.

◆ is_function_type() [1/3]

const function_type * is_function_type ( const type_or_decl_base t)

Test whether a type is a function_type.

Parameters
tthe type to test.
Returns
the function_type_sptr if t is a function_type, null otherwise.

Definition at line 11804 of file abg-ir.cc.

◆ is_function_type() [2/3]

function_type_sptr is_function_type ( const type_or_decl_base_sptr t)

Test whether a type is a function_type.

Parameters
tthe type to test.
Returns
the function_type_sptr if t is a function_type, null otherwise.

Definition at line 11784 of file abg-ir.cc.

◆ is_function_type() [3/3]

function_type * is_function_type ( type_or_decl_base t)

Test whether a type is a function_type.

Parameters
tthe type to test.
Returns
the function_type_sptr if t is a function_type, null otherwise.

Definition at line 11794 of file abg-ir.cc.

◆ is_global_scope() [1/3]

bool is_global_scope ( const scope_decl scope)

Tests whether if a given scope is the global scope.

Parameters
scopethe scope to consider.
Returns
true iff the current scope is the global one.

Definition at line 10510 of file abg-ir.cc.

◆ is_global_scope() [2/3]

const global_scope * is_global_scope ( const scope_decl scope)

Tests whether if a given scope is the global scope.

Parameters
scopethe scope to consider.
Returns
the global_scope* representing the scope scope or 0 if scope is not a global scope.

Definition at line 10520 of file abg-ir.cc.

◆ is_global_scope() [3/3]

bool is_global_scope ( const shared_ptr< scope_decl scope)

Tests whether if a given scope is the global scope.

Parameters
scopethe scope to consider.
Returns
true iff the current scope is the global one.

Definition at line 10529 of file abg-ir.cc.

◆ is_integral_type() [1/2]

type_decl * is_integral_type ( const type_or_decl_base t)

Test if a type is an integral type.

Parameters
tthe type to test.
Returns
the integral type t can be converted to, or nil if is not an integral type.

Definition at line 10925 of file abg-ir.cc.

◆ is_integral_type() [2/2]

type_decl_sptr is_integral_type ( const type_or_decl_base_sptr t)

Test if a type is an integral type.

Parameters
tthe type to test.
Returns
the integral type t can be converted to, or nil if is not an integral type.

Definition at line 10947 of file abg-ir.cc.

◆ is_java_language()

bool is_java_language ( translation_unit::language  l)

Test if a language enumerator designates the Java language.

Parameters
lthe language enumerator to consider.
Returns
true iff l designates the Java language.

Definition at line 1824 of file abg-ir.cc.

◆ is_member_decl() [1/3]

bool is_member_decl ( const decl_base d)

Tests if a declaration is a class member.

Parameters
dthe declaration to consider.
Returns
true if d is a class member, false otherwise.

Definition at line 5435 of file abg-ir.cc.

◆ is_member_decl() [2/3]

bool is_member_decl ( const decl_base d)

Tests if a declaration is a class member.

Parameters
dthe declaration to consider.
Returns
true if d is a class member, false otherwise.

Definition at line 5426 of file abg-ir.cc.

◆ is_member_decl() [3/3]

bool is_member_decl ( const decl_base_sptr  d)

Tests if a declaration is a class member.

Parameters
dthe declaration to consider.
Returns
true if d is a class member, false otherwise.

Definition at line 5417 of file abg-ir.cc.

◆ is_member_function() [1/3]

bool is_member_function ( const function_decl f)

Test whether a function_decl is a member function.

Parameters
fthe function_decl to test.
Returns
true if f is a member function, false otherwise.

Definition at line 6368 of file abg-ir.cc.

◆ is_member_function() [2/3]

bool is_member_function ( const function_decl f)

Test whether a function_decl is a member function.

Parameters
fthe function_decl to test.
Returns
true if f is a member function, false otherwise.

Definition at line 6377 of file abg-ir.cc.

◆ is_member_function() [3/3]

bool is_member_function ( const function_decl_sptr f)

Test whether a function_decl is a member function.

Parameters
fthe function_decl to test.
Returns
true if f is a member function, false otherwise.

Definition at line 6386 of file abg-ir.cc.

◆ is_member_type()

bool is_member_type ( const type_base_sptr &  t)

Tests if a type is a class member.

Parameters
tthe type to consider.
Returns
true if t is a class member type, false otherwise.

Definition at line 5464 of file abg-ir.cc.

◆ is_method_decl() [1/3]

method_decl * is_method_decl ( const type_or_decl_base d)

Test if a function_decl is actually a method_decl.

Parameters
dthe function_decl to consider.
Returns
the method_decl sub-object of d if inherits a method_decl type.

Definition at line 25660 of file abg-ir.cc.

◆ is_method_decl() [2/3]

method_decl * is_method_decl ( const type_or_decl_base d)

Test if a function_decl is actually a method_decl.

Parameters
dthe function_decl to consider.
Returns
the method_decl sub-object of d if inherits a method_decl type.

Definition at line 25647 of file abg-ir.cc.

◆ is_method_decl() [3/3]

method_decl_sptr is_method_decl ( const type_or_decl_base_sptr d)

Test if a function_decl is actually a method_decl.

Parameters
dthe function_decl to consider.
Returns
the method_decl sub-object of d if inherits a method_decl type.

Definition at line 25670 of file abg-ir.cc.

◆ is_method_type() [1/3]

const method_type * is_method_type ( const type_or_decl_base t)

Test whether a type is a method_type.

Parameters
tthe type to test.
Returns
the method_type_sptr if t is a method_type, null otherwise.

Definition at line 11824 of file abg-ir.cc.

◆ is_method_type() [2/3]

method_type_sptr is_method_type ( const type_or_decl_base_sptr t)

Test whether a type is a method_type.

Parameters
tthe type to test.
Returns
the method_type_sptr if t is a method_type, null otherwise.

Definition at line 11814 of file abg-ir.cc.

◆ is_method_type() [3/3]

method_type * is_method_type ( type_or_decl_base t)

Test whether a type is a method_type.

Parameters
tthe type to test.
Returns
the method_type_sptr if t is a method_type, null otherwise.

Definition at line 11834 of file abg-ir.cc.

◆ is_namespace() [1/2]

namespace_decl * is_namespace ( const decl_base d)

Tests if a declaration is a namespace declaration.

Parameters
dthe decalration to consider.
Returns
the namespace declaration if d is a namespace.

Definition at line 12013 of file abg-ir.cc.

◆ is_namespace() [2/2]

namespace_decl_sptr is_namespace ( const decl_base_sptr &  d)

Tests if a declaration is a namespace declaration.

Parameters
dthe decalration to consider.
Returns
the namespace declaration if d is a namespace.

Definition at line 12004 of file abg-ir.cc.

◆ is_non_canonicalized_type() [1/2]

bool is_non_canonicalized_type ( const type_base t)

Test if a given type is allowed to be non canonicalized.

This is a subroutine of hash_as_canonical_type_or_constant.

For now, the only types allowed to be non canonicalized in the system are (typedefs & pointers to) decl-only class/union, the void type and variadic parameter types.

Returns
true iff t is a one of the only types allowed to be non-canonicalized in the system.

Definition at line 28488 of file abg-ir.cc.

◆ is_non_canonicalized_type() [2/2]

bool is_non_canonicalized_type ( const type_base_sptr &  t)

Test if a given type is allowed to be non canonicalized.

This is a subroutine of hash_as_canonical_type_or_constant.

For now, the only types allowed to be non canonicalized in the system are decl-only class/union and the void type.

Returns
true iff t is a one of the only types allowed to be non-canonicalized in the system.

Definition at line 28590 of file abg-ir.cc.

◆ is_npaf_type()

bool is_npaf_type ( const type_base_sptr &  t)

Test if a type is a neither a pointer, an array nor a function type.

Parameters
tthe type to consider.
Returns
true if the t is NOT a pointer, an array nor a function.

Definition at line 10852 of file abg-ir.cc.

◆ is_pointer_to_array_type()

pointer_type_def_sptr is_pointer_to_array_type ( const type_base_sptr &  t)

Test if a type is a pointer to array type.

Parameters
tthe type to consider.
Returns
the pointer_type_def_sptr iff t is a pointer to array type.

Definition at line 11462 of file abg-ir.cc.

◆ is_pointer_to_function_type()

pointer_type_def_sptr is_pointer_to_function_type ( const type_base_sptr &  t)

Test if a type is a pointer to function type.

Parameters
tthe type to consider.
Returns
the pointer_type_def_sptr iff t is a pointer to function type.

Definition at line 11445 of file abg-ir.cc.

◆ is_pointer_to_npaf_type()

pointer_type_def_sptr is_pointer_to_npaf_type ( const type_base_sptr &  t)

Test if we are looking at a pointer to a neither-a-pointer-to-an-array-nor-a-function type.

Parameters
tthe type to consider.
Returns
the pointer_type_def_sptr type iff t is a neither-a-pointer-an-array-nor-a-function type.

Definition at line 11480 of file abg-ir.cc.

◆ is_pointer_to_ptr_to_mbr_type()

pointer_type_def_sptr is_pointer_to_ptr_to_mbr_type ( const type_base_sptr &  t)

Test if we are looking at a pointer to pointer to member type.

Parameters
tthe type to consider.
Returns
the pointer_type_def_sptr type iff t is a pointer to pointer to member type.

Definition at line 11497 of file abg-ir.cc.

◆ is_pointer_type() [1/2]

const pointer_type_def * is_pointer_type ( const type_or_decl_base t,
bool  look_through_qualifiers 
)

Test whether a type is a pointer_type_def.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a pointer_type_def.
Returns
the pointer_type_def_sptr if t is a pointer_type_def, null otherwise.

Definition at line 11405 of file abg-ir.cc.

◆ is_pointer_type() [2/2]

pointer_type_def_sptr is_pointer_type ( const type_or_decl_base_sptr t,
bool  look_through_qualifiers 
)

Test whether a type is a pointer_type_def.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a pointer_type_def.
Returns
the pointer_type_def_sptr if t is a pointer_type_def, null otherwise.

Definition at line 11429 of file abg-ir.cc.

◆ is_ptr_ref_or_qual_type()

bool is_ptr_ref_or_qual_type ( const type_base t)

Helper to detect if a type is either a reference, a pointer, or a qualified type.

Definition at line 3396 of file abg-ir.cc.

◆ is_ptr_to_mbr_type() [1/2]

const ptr_to_mbr_type * is_ptr_to_mbr_type ( const type_or_decl_base t,
bool  look_through_qualifiers 
)

Test whether a type is a ptr_to_mbr_type.

Parameters
tthe type to test.
Returns
the ptr_to_mbr_type* if t is a ptr_to_mbr_type type, null otherwise.

Definition at line 11637 of file abg-ir.cc.

◆ is_ptr_to_mbr_type() [2/2]

ptr_to_mbr_type_sptr is_ptr_to_mbr_type ( const type_or_decl_base_sptr t,
bool  look_through_qualifiers 
)

Test whether a type is a ptr_to_mbr_type_sptr.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a ptr_to_mbr_type..
Returns
the ptr_to_mbr_type_sptr if t is a ptr_to_mbr_type type, null otherwise.

Definition at line 11657 of file abg-ir.cc.

◆ is_qualified_type() [1/2]

qualified_type_def * is_qualified_type ( const type_or_decl_base t)

Test whether a type is a reference_type_def.

Parameters
tthe type to test.
Returns
the reference_type_def_sptr if t is a reference_type_def, null otherwise.

Definition at line 11764 of file abg-ir.cc.

◆ is_qualified_type() [2/2]

qualified_type_def_sptr is_qualified_type ( const type_or_decl_base_sptr t)

Test whether a type is a qualified_type_def.

Parameters
tthe type to test.
Returns
the qualified_type_def_sptr if t is a qualified_type_def, null otherwise.

Definition at line 11774 of file abg-ir.cc.

◆ is_real_type() [1/2]

type_decl * is_real_type ( const type_or_decl_base t)

Test if a type is a real type.

Parameters
tthe type to test.
Returns
the real type t can be converted to, or nil if is not a real type.

Definition at line 10885 of file abg-ir.cc.

◆ is_real_type() [2/2]

type_decl_sptr is_real_type ( const type_or_decl_base_sptr t)

Test if a type is a real type.

Parameters
tthe type to test.
Returns
the real type t can be converted to, or nil if is not a real type.

Definition at line 10905 of file abg-ir.cc.

◆ is_reference_type() [1/3]

const reference_type_def * is_reference_type ( const type_or_decl_base t,
bool  look_through_qualifiers 
)

Test whether a type is a reference_type_def.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a reference_type_def.
Returns
the reference_type_def_sptr if t is a reference_type_def, null otherwise.

Definition at line 11600 of file abg-ir.cc.

◆ is_reference_type() [2/3]

reference_type_def_sptr is_reference_type ( const type_or_decl_base_sptr t,
bool  look_through_qualifiers 
)

Test whether a type is a reference_type_def.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a reference_type_def.
Returns
the reference_type_def_sptr if t is a reference_type_def, null otherwise.

Definition at line 11621 of file abg-ir.cc.

◆ is_reference_type() [3/3]

reference_type_def * is_reference_type ( type_or_decl_base t,
bool  look_through_qualifiers 
)

Test whether a type is a reference_type_def.

Parameters
tthe type to test.
look_through_decl_onlyif this is true, then look through qualified types to see if the underlying type is a reference_type_def.
Returns
the reference_type_def_sptr if t is a reference_type_def, null otherwise.

Definition at line 11577 of file abg-ir.cc.

◆ is_scope_decl() [1/2]

const scope_decl * is_scope_decl ( const decl_base d)

Test if a declaration is a scope_decl.

Parameters
dthe declaration to take in account.
Returns
the a pointer to the scope_decl sub-object of d, if d is a scope_decl.

Definition at line 5445 of file abg-ir.cc.

◆ is_scope_decl() [2/2]

scope_decl_sptr is_scope_decl ( const decl_base_sptr &  d)

Test if a declaration is a scope_decl.

Parameters
dthe declaration to take in account.
Returns
the a pointer to the scope_decl sub-object of d, if d is a scope_decl.

Definition at line 5455 of file abg-ir.cc.

◆ is_subrange_type() [1/2]

array_type_def::subrange_type * is_subrange_type ( const type_or_decl_base type)

Test if a type is an array_type_def::subrange_type.

Parameters
typethe type to consider.
Returns
the array_type_def::subrange_type which type is a type of, or nil if it's not of that type.

Definition at line 12141 of file abg-ir.cc.

◆ is_subrange_type() [2/2]

array_type_def::subrange_sptr is_subrange_type ( const type_or_decl_base_sptr type)

Test if a type is an array_type_def::subrange_type.

Parameters
typethe type to consider.
Returns
the array_type_def::subrange_type which type is a type of, or nil if it's not of that type.

Definition at line 12154 of file abg-ir.cc.

◆ is_template_decl()

bool is_template_decl ( const decl_base_sptr &  decl)

Tests whether a decl is a template.

Parameters
declthe decl to consider.
Returns
true iff decl is a function template, class template, or template template parameter.

Definition at line 12164 of file abg-ir.cc.

◆ is_template_parameter()

bool is_template_parameter ( const shared_ptr< decl_base decl)

Tests whether a decl is a template parameter.

Parameters
declthe decl to consider.
Returns
true iff decl is a template parameter.

Definition at line 10639 of file abg-ir.cc.

◆ is_template_parm_composition_type()

bool is_template_parm_composition_type ( const shared_ptr< decl_base decl)

Tests whether a decl is a template parameter composition type.

Parameters
declthe declaration to consider.
Returns
true iff decl is a template parameter composition type.

Definition at line 12022 of file abg-ir.cc.

◆ is_type() [1/3]

bool is_type ( const type_or_decl_base tod)

Test whether a declaration is a type.

Parameters
dthe IR artefact to test for.
Returns
true if the artifact is a type, false otherwise.

Definition at line 10765 of file abg-ir.cc.

◆ is_type() [2/3]

type_base * is_type ( const type_or_decl_base t)

Test whether a declaration is a type.

Parameters
dthe IR artefact to test for.
Returns
true if the artifact is a type, false otherwise.

Definition at line 10778 of file abg-ir.cc.

◆ is_type() [3/3]

type_base_sptr is_type ( const type_or_decl_base_sptr tod)

Test whether a declaration is a type.

Parameters
dthe IR artefact to test for.
Returns
true if the artifact is a type, false otherwise.

Definition at line 10793 of file abg-ir.cc.

◆ is_type_decl() [1/2]

const type_decl * is_type_decl ( const type_or_decl_base t)

Test whether a type is a type_decl (a builtin type).

Returns
the type_decl* for @t if it's type_decl, otherwise, return nil.

Definition at line 10867 of file abg-ir.cc.

◆ is_type_decl() [2/2]

type_decl_sptr is_type_decl ( const type_or_decl_base_sptr t)

Test whether a type is a type_decl (a builtin type).

Returns
the type_decl_sptr for @t if it's type_decl, otherwise, return nil.

Definition at line 10875 of file abg-ir.cc.

◆ is_typedef() [1/4]

const typedef_decl * is_typedef ( const type_base t)

Test whether a type is a typedef.

Parameters
tthe declaration of the type to test for.
Returns
the typedef declaration of the t, or NULL if it's not a typedef.

Definition at line 10979 of file abg-ir.cc.

◆ is_typedef() [2/4]

const typedef_decl * is_typedef ( const type_or_decl_base t)

Test whether a type is a typedef.

Parameters
tthe declaration of the type to test for.
Returns
the typedef declaration of the t, or NULL if it's not a typedef.

Definition at line 10999 of file abg-ir.cc.

◆ is_typedef() [3/4]

typedef_decl_sptr is_typedef ( const type_or_decl_base_sptr  t)

Test whether a type is a typedef.

Parameters
tthe type to test for.
Returns
the typedef declaration of the t, or NULL if it's not a typedef.

Definition at line 10969 of file abg-ir.cc.

◆ is_typedef() [4/4]

typedef_decl * is_typedef ( type_base t)

Test whether a type is a typedef.

Parameters
tthe declaration of the type to test for.
Returns
the typedef declaration of the t, or NULL if it's not a typedef.

Definition at line 10989 of file abg-ir.cc.

◆ is_typedef_of_array()

array_type_def_sptr is_typedef_of_array ( const type_base_sptr &  t)

Test if a type is a typedef of an array.

Note that the function looks through qualified and typedefs types of the underlying type of the current typedef. In other words, if we are looking at a typedef of a CV-qualified array, or at a typedef of a CV-qualified typedef of an array, this function will still return TRUE.

Parameters
tthe type to consider.
Returns
true if t is a typedef which underlying type is an array. That array might be either cv-qualified array or a typedef'ed array, or a combination of both.

Definition at line 12120 of file abg-ir.cc.

◆ is_typedef_of_maybe_qualified_class_or_union_type() [1/2]

bool is_typedef_of_maybe_qualified_class_or_union_type ( const type_base t)

Test if a type is a typedef of a class or union type, or a typedef of a qualified class or union type.

Note that if the type is directly a class or union type, the function returns true as well.

Parameters
tthe type to consider.
Returns
true iff t is a typedef of a class or union type, or a typedef of a qualified class or union type.

Definition at line 11540 of file abg-ir.cc.

◆ is_typedef_of_maybe_qualified_class_or_union_type() [2/2]

bool is_typedef_of_maybe_qualified_class_or_union_type ( const type_base_sptr &  t)

Test if a type is a typedef of a class or union type, or a typedef of a qualified class or union type.

Note that if the type is directly a class or union type, the function returns true as well.

Parameters
tthe type to consider.
Returns
true iff t is a typedef of a class or union type, or a typedef of a qualified class or union type.

Definition at line 11563 of file abg-ir.cc.

◆ is_typedef_ptr_or_ref_to_decl_only_class_or_union_type()

bool is_typedef_ptr_or_ref_to_decl_only_class_or_union_type ( const type_base t)

Test if a type is a typedef, pointer or reference to a decl-only class/union.

This looks into qualified types too.

Parameters
tthe type to consider.
Returns
true iff t is a type is a typedef, pointer or reference to a decl-only class/union.

Definition at line 11517 of file abg-ir.cc.

◆ is_union_type() [1/3]

union_decl_sptr is_union_type ( const shared_ptr< type_or_decl_base > &  t)

Test if a type is a union_decl.

Parameters
tthe type to consider.
Returns
the union_decl is is a union_decl, or nil otherwise.

Definition at line 11391 of file abg-ir.cc.

◆ is_union_type() [2/3]

bool is_union_type ( const type_or_decl_base t)

Test if a type is a union_decl.

Parameters
tthe type to consider.
Returns
true iff t is a union_decl.

Definition at line 11371 of file abg-ir.cc.

◆ is_union_type() [3/3]

union_decl * is_union_type ( const type_or_decl_base t)

Test if a type is a union_decl.

Parameters
tthe type to consider.
Returns
the union_decl is is a union_decl, or nil otherwise.

Definition at line 11381 of file abg-ir.cc.

◆ is_unique_type() [1/2]

bool is_unique_type ( const type_base t)

Test if a type is unique in the entire environment.

Examples of unique types are void, void* and variadic parameter types.

Parameters
tthe type to test for.
Returns
true iff the type t is unique in the entire environment.

Definition at line 28537 of file abg-ir.cc.

◆ is_unique_type() [2/2]

bool is_unique_type ( const type_base_sptr &  t)

Test if a type is unique in the entire environment.

Examples of unique types are void, void* and variadic parameter types.

Parameters
tthe type to test for.
Returns
true iff the type t is unique in the entire environment.

Definition at line 28524 of file abg-ir.cc.

◆ is_user_defined_type() [1/2]

bool is_user_defined_type ( const type_base t)

Test if a type is user-defined.

A type is considered user-defined if it's a struct/class/union/enum that is *NOT* artificial.

Parameters
tthe type to consider.
Returns
true iff the type t is user-defined.

Definition at line 5479 of file abg-ir.cc.

◆ is_user_defined_type() [2/2]

bool is_user_defined_type ( const type_base_sptr &  t)

Test if a type is user-defined.

A type is considered user-defined if it's a struct/class/union/enum.

Parameters
tthe type to consider.
Returns
true iff the type t is user-defined.

Definition at line 5504 of file abg-ir.cc.

◆ is_var_decl() [1/2]

var_decl * is_var_decl ( const type_or_decl_base tod)

Tests if a declaration is a variable declaration.

Parameters
declthe decl to test.
Returns
the var_decl_sptr iff decl is a variable declaration; nil otherwise.

Definition at line 11985 of file abg-ir.cc.

◆ is_var_decl() [2/2]

var_decl_sptr is_var_decl ( const type_or_decl_base_sptr decl)

Tests if a declaration is a variable declaration.

Parameters
declthe decl to test.
Returns
the var_decl_sptr iff decl is a variable declaration; nil otherwise.

Definition at line 11995 of file abg-ir.cc.

◆ is_void_pointer_type() [1/2]

const type_base * is_void_pointer_type ( const type_base t)

Test if a type is a pointer to void type.

Parameters
typethe type to consider.
Returns
the actual void pointer if is a void pointer or NULL if it's not.

Definition at line 11713 of file abg-ir.cc.

◆ is_void_pointer_type() [2/2]

const type_base_sptr is_void_pointer_type ( const type_base_sptr &  t)

Test if a type is a pointer to void type.

Parameters
typethe type to consider.
Returns
the actual void pointer if is a void pointer or NULL if it's not.

Definition at line 11738 of file abg-ir.cc.

◆ is_void_pointer_type_equivalent() [1/2]

const type_base * is_void_pointer_type_equivalent ( const type_base type)

Test if a type is equivalent to a pointer to void type.

Note that this looks trough typedefs or CV qualifiers to look for the void pointer.

Parameters
typethe type to consider.
Returns
the actual void pointer if is eqivalent to a void pointer or NULL if it's not.

Definition at line 11703 of file abg-ir.cc.

◆ is_void_pointer_type_equivalent() [2/2]

const type_base * is_void_pointer_type_equivalent ( const type_base type)

Test if a type is equivalent to a pointer to void type.

Note that this looks trough typedefs or CV qualifiers to look for the void pointer.

Parameters
typethe type to consider.
Returns
the actual void pointer if is eqivalent to a void pointer or NULL if it's not.

Definition at line 11676 of file abg-ir.cc.

◆ keep_type_alive()

void keep_type_alive ( type_base_sptr  t)

Make sure that the life time of a given (smart pointer to a) type is the same as the life time of the libabigail library.

Parameters
tthe type to consider.

Definition at line 28327 of file abg-ir.cc.

◆ look_through_decl_only() [1/3]

decl_base_sptr look_through_decl_only ( const decl_base d)

If a decl is decl-only get its definition. Otherwise, just return nil.

Parameters
dthe decl to consider.
Returns
either the definition of the decl, or nil.

Definition at line 11893 of file abg-ir.cc.

◆ look_through_decl_only() [2/3]

decl_base_sptr look_through_decl_only ( const decl_base_sptr &  d)

If a decl is decl-only get its definition. Otherwise, just return nil.

Parameters
dthe decl to consider.
Returns
either the definition of the decl, or nil.

Definition at line 11934 of file abg-ir.cc.

◆ look_through_decl_only() [3/3]

decl_base * look_through_decl_only ( decl_base d)

If a decl is decl-only enum, get its definition. Otherwise, just return the initial decl.

Parameters
dthe decl to consider.
Returns
either the definition of the enum, or the decl itself.

Definition at line 11916 of file abg-ir.cc.

◆ look_through_decl_only_class() [1/3]

class_or_union * look_through_decl_only_class ( class_or_union the_class)

If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class.

Parameters
the_classthe class (or union) to consider.
Returns
either the definition of the class, or the class itself.

Definition at line 11844 of file abg-ir.cc.

◆ look_through_decl_only_class() [2/3]

class_or_union_sptr look_through_decl_only_class ( class_or_union_sptr  klass)

If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class.

Parameters
klassthe class (or union) to consider.
Returns
either the definition of the class, or the class itself.

Definition at line 11864 of file abg-ir.cc.

◆ look_through_decl_only_class() [3/3]

class_or_union_sptr look_through_decl_only_class ( const class_or_union the_class)

If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial class.

Parameters
the_classthe class (or union) to consider.
Returns
either the definition of the class, or the class itself.

Definition at line 11854 of file abg-ir.cc.

◆ look_through_decl_only_enum() [1/2]

enum_type_decl_sptr look_through_decl_only_enum ( const enum_type_decl the_enum)

If an enum is a decl-only enum, get its definition. Otherwise, just return the initial enum.

Parameters
the_enumthe enum to consider.
Returns
either the definition of the enum, or the enum itself.

Definition at line 11874 of file abg-ir.cc.

◆ look_through_decl_only_enum() [2/2]

enum_type_decl_sptr look_through_decl_only_enum ( enum_type_decl_sptr  enom)

If an enum is a decl-only enum, get its definition. Otherwise, just return the initial enum.

Parameters
enomthe enum to consider.
Returns
either the definition of the enum, or the enum itself.

Definition at line 11884 of file abg-ir.cc.

◆ look_through_decl_only_type() [1/2]

type_base_sptr look_through_decl_only_type ( const type_base_sptr &  t)

If a type is is decl-only, then get its definition. Otherwise, just return the initial type.

Parameters
dthe decl to consider.
Returns
either the definition of the decl, or the initial type.

Definition at line 11969 of file abg-ir.cc.

◆ look_through_decl_only_type() [2/2]

type_base * look_through_decl_only_type ( type_base t)

If a type is is decl-only, then get its definition. Otherwise, just return the initial type.

Parameters
dthe decl to consider.
Returns
either the definition of the decl, or the initial type.

Definition at line 11953 of file abg-ir.cc.

◆ lookup_array_type() [1/3]

array_type_def_sptr lookup_array_type ( const array_type_def t,
const corpus corp 
)

Look into a given corpus to find an array type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the array type to look for.
corpthe corpus to look into.
Returns
the array type found.

Definition at line 14298 of file abg-ir.cc.

◆ lookup_array_type() [2/3]

array_type_def_sptr lookup_array_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find an array type which has the same qualified name as a given array type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe type which has the same qualified name as the type we are looking for.
corpthe corpus to look into.
Returns
the type found.

Definition at line 14319 of file abg-ir.cc.

◆ lookup_array_type() [3/3]

array_type_def_sptr lookup_array_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup an array type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the array type to look for.
tuthe translation unit to look into.
Returns
the array type found or nil if no array type was found.

Definition at line 12746 of file abg-ir.cc.

◆ lookup_basic_type() [1/5]

type_decl_sptr lookup_basic_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a basic type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the basic type to look for.
corpthe corpus to look into.

Definition at line 13586 of file abg-ir.cc.

◆ lookup_basic_type() [2/5]

type_decl_sptr lookup_basic_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a basic type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the basic type to look for.
tuthe translation unit to look into.
Returns
the basic type found or nil if no basic type was found.

Definition at line 12371 of file abg-ir.cc.

◆ lookup_basic_type() [3/5]

type_decl_sptr lookup_basic_type ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find a basic type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the basic type to look for.
corpthe corpus to look into.

Definition at line 13646 of file abg-ir.cc.

◆ lookup_basic_type() [4/5]

type_decl_sptr lookup_basic_type ( const string &  type_name,
const translation_unit tu 
)

Lookup a basic type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the basic type to look for.
tuthe translation unit to look into.
Returns
the basic type found or nil if no basic type was found.

Definition at line 12389 of file abg-ir.cc.

◆ lookup_basic_type() [5/5]

type_decl_sptr lookup_basic_type ( const type_decl t,
const corpus corp 
)

Look into a given corpus to find a type which has the same qualified name as a giventype.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe type which has the same qualified name as the type we are looking for.
corpthe ABI corpus to look into for the type.

Definition at line 13570 of file abg-ir.cc.

◆ lookup_basic_type_per_location() [1/2]

type_decl_sptr lookup_basic_type_per_location ( const interned_string loc,
const corpus corp 
)

Lookup a type_decl type from a given corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the resulting basic type, if any.

Definition at line 13607 of file abg-ir.cc.

◆ lookup_basic_type_per_location() [2/2]

type_decl_sptr lookup_basic_type_per_location ( const string &  loc,
const corpus corp 
)

Lookup a type_decl type from a given corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the resulting basic type, if any.

Definition at line 13627 of file abg-ir.cc.

◆ lookup_class_or_typedef_type()

type_base_sptr lookup_class_or_typedef_type ( const string &  qualified_name,
const corpus corp 
)

Look into a corpus to find a class, union or typedef type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe name of the type to find.
corpthe corpus to look into.
Returns
the typedef or class type found.

Definition at line 14114 of file abg-ir.cc.

◆ lookup_class_type() [1/5]

class_decl_sptr lookup_class_type ( const class_decl t,
const corpus corp 
)

Look into a given corpus to find a class type which has the same qualified name as a given type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe class decl type which has the same qualified name as the type we are looking for.
corpthe corpus to look into.

Definition at line 13665 of file abg-ir.cc.

◆ lookup_class_type() [2/5]

class_decl_sptr lookup_class_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a class type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.

Definition at line 13701 of file abg-ir.cc.

◆ lookup_class_type() [3/5]

class_decl_sptr lookup_class_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a class type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the class type to look for.
tuthe translation unit to look into.
Returns
the class type found or nil if no class type was found.

Definition at line 12430 of file abg-ir.cc.

◆ lookup_class_type() [4/5]

class_decl_sptr lookup_class_type ( const string &  fqn,
const translation_unit tu 
)

Lookup a class type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
fqnthe fully qualified name of the class type node to look up.
tuthe translation unit to perform lookup from.
Returns
the declaration of the class type IR node found, NULL otherwise.

Definition at line 12411 of file abg-ir.cc.

◆ lookup_class_type() [5/5]

class_decl_sptr lookup_class_type ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find a class type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.

Definition at line 13683 of file abg-ir.cc.

◆ lookup_class_type_per_location() [1/2]

class_decl_sptr lookup_class_type_per_location ( const interned_string loc,
const corpus corp 
)

Look up a class_decl from a given corpus by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the resulting class decl, if any.

Definition at line 13815 of file abg-ir.cc.

◆ lookup_class_type_per_location() [2/2]

class_decl_sptr lookup_class_type_per_location ( const string &  loc,
const corpus corp 
)

Look up a class_decl from a given corpus by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the resulting class decl, if any.

Definition at line 13833 of file abg-ir.cc.

◆ lookup_class_type_through_scopes()

class_decl_sptr lookup_class_type_through_scopes ( const list< string > &  fqn,
const translation_unit tu 
)

Lookup a class type from a translation unit by walking its scopes in sequence and by looking into them.

This is much slower than using the lookup_class_type() function because it walks all the scopes of the translation unit in sequence and lookup the types to find one that has a given name.

Parameters
fqnthe components of the fully qualified name of the class type node to look up.
tuthe translation unit to perform lookup from.
Returns
the declaration of the class type IR node found, NULL otherwise.

Definition at line 13246 of file abg-ir.cc.

◆ lookup_class_typedef_or_enum_type()

type_base_sptr lookup_class_typedef_or_enum_type ( const string &  qualified_name,
const corpus corp 
)

Look into a corpus to find a class, typedef or enum type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the typedef, class or enum type found.

Definition at line 14139 of file abg-ir.cc.

◆ lookup_class_types() [1/2]

const type_base_wptrs_type * lookup_class_types ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find the class type*s* that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of class types named qualified_name.

Definition at line 13719 of file abg-ir.cc.

◆ lookup_class_types() [2/2]

const type_base_wptrs_type * lookup_class_types ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find the class type*s* that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of class types which name is qualified_name.

Definition at line 13786 of file abg-ir.cc.

◆ lookup_data_member() [1/2]

const var_decl * lookup_data_member ( const type_base type,
const char *  dm_name 
)

Look for a data member of a given class, struct or union type and return it.

The data member is designated by its name.

Parameters
typethe class, struct or union type to consider.
dm_namethe name of the data member to lookup.
Returns
the data member iff it was found in @type or NULL if no data member with that name was found.

Definition at line 28954 of file abg-ir.cc.

◆ lookup_data_member() [2/2]

const var_decl_sptr lookup_data_member ( const type_base_sptr &  type,
const var_decl_sptr dm 
)

Look for a data member of a given class, struct or union type and return it.

The data member is designated by its name.

Parameters
typethe class, struct or union type to consider.
dmthe data member to lookup.
Returns
the data member iff it was found in @type or NULL if no data member with that name was found.

Definition at line 28977 of file abg-ir.cc.

◆ lookup_decl_only_class_types()

bool lookup_decl_only_class_types ( const interned_string qualified_name,
const corpus corp,
type_base_wptrs_type result 
)

Look into a given corpus to find the class type*s* that have a given qualified name and that are declaration-only.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
resultthe vector of decl-only class types named qualified_name. This is populated iff the function returns true.
Returns
true iff result was populated with the decl-only classes named qualified_name.

Definition at line 13739 of file abg-ir.cc.

◆ lookup_enum_type() [1/5]

enum_type_decl_sptr lookup_enum_type ( const enum_type_decl t,
const corpus corp 
)

Look into a given corpus to find an enum type which has the same qualified name as a given enum type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe enum type which has the same qualified name as the type we are looking for.
corpthe corpus to look into.

Definition at line 13893 of file abg-ir.cc.

◆ lookup_enum_type() [2/5]

enum_type_decl_sptr lookup_enum_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find an enum type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the enum type to look for.
corpthe corpus to look into.

Definition at line 13931 of file abg-ir.cc.

◆ lookup_enum_type() [3/5]

enum_type_decl_sptr lookup_enum_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup an enum type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the enum type to look for.
tuthe translation unit to look into.
Returns
the enum type found or nil if no enum type was found.

Definition at line 12516 of file abg-ir.cc.

◆ lookup_enum_type() [4/5]

enum_type_decl_sptr lookup_enum_type ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find an enum type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the enum type to look for.
corpthe corpus to look into.

Definition at line 13912 of file abg-ir.cc.

◆ lookup_enum_type() [5/5]

enum_type_decl_sptr lookup_enum_type ( const string &  type_name,
const translation_unit tu 
)

Lookup an enum type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the enum type to look for.
tuthe translation unit to look into.
Returns
the enum type found or nil if no enum type was found.

Definition at line 12534 of file abg-ir.cc.

◆ lookup_enum_type_per_location() [1/2]

enum_type_decl_sptr lookup_enum_type_per_location ( const interned_string loc,
const corpus corp 
)

Look up an enum_type_decl from a given corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to look the type from.
Returns
the resulting enum type, if any.

Definition at line 13982 of file abg-ir.cc.

◆ lookup_enum_type_per_location() [2/2]

enum_type_decl_sptr lookup_enum_type_per_location ( const string &  loc,
const corpus corp 
)

Look up an enum_type_decl from a given corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to look the type from.
Returns
the resulting enum type, if any.

Definition at line 13999 of file abg-ir.cc.

◆ lookup_enum_types() [1/2]

const type_base_wptrs_type * lookup_enum_types ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find the enum type*s* that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of enum types that which name is qualified_name.

Definition at line 13952 of file abg-ir.cc.

◆ lookup_enum_types() [2/2]

const type_base_wptrs_type * lookup_enum_types ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find the enum type*s* that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of enum types that which name is qualified_name.

Definition at line 13968 of file abg-ir.cc.

◆ lookup_function_type() [1/6]

function_type_sptr lookup_function_type ( const function_type t,
const corpus corp 
)

Look into a given corpus to find a function type which has the same qualified name as a given function type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe function type which has the same qualified name as the function type we are looking for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14346 of file abg-ir.cc.

◆ lookup_function_type() [2/6]

function_type_sptr lookup_function_type ( const function_type t,
const translation_unit tu 
)

Lookup a function type from a translation unit.

This walks all the function types held by the translation unit and compare their sub-type *names*. If the names match then return the function type found in the translation unit.

Parameters
tthe function type to look for.
tuthe translation unit to look into.
Returns
the function type found, or NULL of none was found.

Definition at line 12786 of file abg-ir.cc.

◆ lookup_function_type() [3/6]

function_type_sptr lookup_function_type ( const function_type_sptr fn_t,
const corpus corpus 
)

Look into a given corpus to find a function type which has the same qualified name as a given function type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe function type which has the same qualified name as the function type we are looking for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14367 of file abg-ir.cc.

◆ lookup_function_type() [4/6]

function_type_sptr lookup_function_type ( const function_type_sptr t,
const translation_unit tu 
)

Lookup a function type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
tthe function type to look for.
tuthe translation unit to look into.
Returns
the function type found, or NULL of none was found.

Definition at line 12805 of file abg-ir.cc.

◆ lookup_function_type() [5/6]

function_type_sptr lookup_function_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a function type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the function type to look for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14390 of file abg-ir.cc.

◆ lookup_function_type() [6/6]

function_type_sptr lookup_function_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a function type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the type to lookup.
tuthe translation unit to look into.
Returns
the function type found, or NULL of none was found.

Definition at line 12766 of file abg-ir.cc.

◆ lookup_or_synthesize_fn_type()

function_type_sptr lookup_or_synthesize_fn_type ( const function_type_sptr fn_t,
const corpus corpus 
)

Look into an ABI corpus for a function type.

Parameters
fn_typethe function type to be looked for in the ABI corpus.
corpusthe ABI corpus into which to look for the function type.
Returns
the function type found in the corpus.

Definition at line 13536 of file abg-ir.cc.

◆ lookup_pointer_type() [1/5]

pointer_type_def_sptr lookup_pointer_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a pointer type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the pointer type to look for.
corpthe corpus to look into.
Returns
the pointer type found.

Definition at line 14220 of file abg-ir.cc.

◆ lookup_pointer_type() [2/5]

pointer_type_def_sptr lookup_pointer_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a pointer type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the pointer type to look for.
tuthe translation unit to look into.
Returns
the pointer type found or nil if no pointer type was found.

Definition at line 12640 of file abg-ir.cc.

◆ lookup_pointer_type() [3/5]

pointer_type_def_sptr lookup_pointer_type ( const pointer_type_def t,
const corpus corp 
)

Look into a given corpus to find a pointer type which has the same qualified name as a given pointer type.

Parameters
tthe pointer type which has the same qualified name as the type we are looking for.
corpthe corpus to look into.
Returns
the pointer type found.

Definition at line 14199 of file abg-ir.cc.

◆ lookup_pointer_type() [4/5]

pointer_type_def_sptr lookup_pointer_type ( const string &  type_name,
const translation_unit tu 
)

Lookup a pointer type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the pointer type to look for.
tuthe translation unit to look into.
Returns
the pointer type found or nil if no pointer type was found.

Definition at line 12661 of file abg-ir.cc.

◆ lookup_pointer_type() [5/5]

pointer_type_def_sptr lookup_pointer_type ( const type_base_sptr &  pointed_to_type,
const translation_unit tu 
)

Lookup a pointer type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
pointed_to_typethe pointed-to-type of the pointer to look for.
tuthe translation unit to look into.
Returns
the pointer type found or nil if no pointer type was found.

Definition at line 12681 of file abg-ir.cc.

◆ lookup_qualified_type() [1/4]

qualified_type_def_sptr lookup_qualified_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a qualified type which has a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the type found.

Definition at line 14174 of file abg-ir.cc.

◆ lookup_qualified_type() [2/4]

qualified_type_def_sptr lookup_qualified_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a qualified type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the qualified type to look for.
tuthe translation unit to look into.
Returns
the qualified type found or nil if no qualified type was found.

Definition at line 12594 of file abg-ir.cc.

◆ lookup_qualified_type() [3/4]

qualified_type_def_sptr lookup_qualified_type ( const qualified_type_def t,
const corpus corp 
)

Look into a given corpus to find a qualified type which has the same qualified name as a given type.

Parameters
tthe type which has the same qualified name as the qualified type we are looking for.
corpthe corpus to look into.
Returns
the qualified type found.

Definition at line 14159 of file abg-ir.cc.

◆ lookup_qualified_type() [4/4]

qualified_type_def_sptr lookup_qualified_type ( const type_base_sptr &  underlying_type,
qualified_type_def::CV  quals,
const translation_unit tu 
)

Lookup a qualified type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
underlying_typethe underying type of the qualified type to look up.
qualsthe CV-qualifiers of the qualified type to look for.
tuthe translation unit to look into.
Returns
the qualified type found or nil if no qualified type was found.

Definition at line 12618 of file abg-ir.cc.

◆ lookup_reference_type() [1/4]

reference_type_def_sptr lookup_reference_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a reference type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the reference type to look for.
corpthe corpus to look into.
Returns
the reference type found.

Definition at line 14269 of file abg-ir.cc.

◆ lookup_reference_type() [2/4]

reference_type_def_sptr lookup_reference_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a reference type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the reference type to look for.
tuthe translation unit to look into.
Returns
the reference type found or nil if no reference type was found.

Definition at line 12702 of file abg-ir.cc.

◆ lookup_reference_type() [3/4]

reference_type_def_sptr lookup_reference_type ( const reference_type_def t,
const corpus corp 
)

Look into a given corpus to find a reference type which has the same qualified name as a given reference type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe reference type which has the same qualified name as the reference type we are looking for.
corpthe corpus to look into.
Returns
the reference type found.

Definition at line 14248 of file abg-ir.cc.

◆ lookup_reference_type() [4/4]

const reference_type_def_sptr lookup_reference_type ( const type_base_sptr &  pointed_to_type,
bool  lvalue_reference,
const translation_unit tu 
)

Lookup a reference type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
pointed_to_typethe pointed-to-type of the reference to look up.
tuthe translation unit to look into.
Returns
the reference type found or nil if no reference type was found.

Definition at line 12724 of file abg-ir.cc.

◆ lookup_type() [1/6]

const type_base_sptr lookup_type ( const interned_string fqn,
const translation_unit tu 
)

Lookup a type in a translation unit.

Parameters
fqnthe fully qualified name of the type to lookup.
tuthe translation unit to consider.
Returns
the declaration of the type if found, NULL otherwise.

Definition at line 12817 of file abg-ir.cc.

◆ lookup_type() [2/6]

type_base_sptr lookup_type ( const interned_string n,
const corpus corp 
)

Look into a given corpus to find a type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the function type to look for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14418 of file abg-ir.cc.

◆ lookup_type() [3/6]

type_base_sptr lookup_type ( const string &  fqn,
const translation_unit tu 
)

Lookup a type in a translation unit, starting from the global namespace.

Parameters
fqnthe fully qualified name of the type to lookup.
tuthe translation unit to consider.
Returns
the declaration of the type if found, NULL otherwise.

Definition at line 12844 of file abg-ir.cc.

◆ lookup_type() [4/6]

type_base_sptr lookup_type ( const type_base t,
const corpus corp 
)

Look into a given corpus to find a type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the function type to look for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14477 of file abg-ir.cc.

◆ lookup_type() [5/6]

type_base_sptr lookup_type ( const type_base_sptr &  t,
const corpus corp 
)

Look into a given corpus to find a type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the function type to look for.
corpthe corpus to look into.
Returns
the function type found.

Definition at line 14497 of file abg-ir.cc.

◆ lookup_type() [6/6]

const type_base_sptr lookup_type ( const type_base_sptr  type,
const translation_unit tu 
)

Lookup a type from a translation unit.

Parameters
fqnthe components of the fully qualified name of the node to look up.
tuthe translation unit to perform lookup from.
Returns
the declaration of the IR node found, NULL otherwise.

Definition at line 12860 of file abg-ir.cc.

◆ lookup_type_from_translation_unit()

type_base_sptr lookup_type_from_translation_unit ( const string &  type_name,
const string &  tu_path,
const corpus corp 
)

Lookup a type from a given translation unit present in a give corpus.

Parameters
type_namethe name of the type to look for.

@parm tu_path the path of the translation unit to consider.

Parameters
corpthe corpus to consider.
Returns
the resulting type, if any.

Definition at line 13511 of file abg-ir.cc.

◆ lookup_type_in_scope() [1/2]

const type_base_sptr lookup_type_in_scope ( const list< string > &  comps,
const scope_decl_sptr scope 
)

lookup a type in a scope.

This is really slow as it walks the member types of the scope in sequence to find the type with a given name.

If possible, users should prefer looking up types from the enclosing translation unit or even ABI corpus because both the translation unit and the corpus have a map of type, indexed by their name. Looking up a type from those maps is thus much faster.

Parameters
compsthe components of the fully qualified name of the type to lookup.
skopethe scope to look into.
Returns
the declaration of the type found.

Definition at line 13048 of file abg-ir.cc.

◆ lookup_type_in_scope() [2/2]

const type_base_sptr lookup_type_in_scope ( const string &  fqn,
const scope_decl_sptr skope 
)

Lookup a type in a scope.

This is really slow as it walks the member types of the scope in sequence to find the type with a given name.

If possible, users should prefer looking up types from the enclosing translation unit or even ABI corpus because both the translation unit and the corpus have a map of type, indexed by their name. Looking up a type from those maps is thus much faster.

Parameters
fqnthe fully qualified name of the type to lookup.
skopethe scope to look into.
Returns
the declaration of the type if found, NULL otherwise.

Definition at line 12884 of file abg-ir.cc.

◆ lookup_type_per_location()

type_base_sptr lookup_type_per_location ( const interned_string loc,
const corpus corp 
)

Lookup a type from a corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to look the type from.
Returns
the resulting type, if any found.

Definition at line 14444 of file abg-ir.cc.

◆ lookup_type_through_scopes() [1/2]

type_base_sptr lookup_type_through_scopes ( const list< string > &  fqn,
const translation_unit tu 
)

Lookup a type from a translation unit by walking its scopes in sequence and by looking into them.

This is much slower than using the lookup_type() function.

Parameters
fqnthe components of the fully qualified name of the node to look up.
tuthe translation unit to perform lookup from.
Returns
the declaration of the IR node found, NULL otherwise.

Definition at line 13226 of file abg-ir.cc.

◆ lookup_type_through_scopes() [2/2]

const type_base_sptr lookup_type_through_scopes ( const type_base_sptr  type,
const translation_unit tu 
)

Lookup a type from a translation unit by walking the scopes of the translation unit in sequence and looking into them.

This is really slow as it walks the member types of the scopes in sequence to find the type with a given name.

If possible, users should prefer looking up types from the translation unit or even ABI corpus in a more direct way, by using the lookup_type() functins.

This is because both the translation unit and the corpus have a map of types, indexed by their name. Looking up a type from those maps is thus much faster.

Parameters
fqnthe components of the fully qualified name of the node to look up.
tuthe translation unit to perform lookup from.
Returns
the declaration of the IR node found, NULL otherwise.

Definition at line 13178 of file abg-ir.cc.

◆ lookup_type_through_translation_units()

type_base_sptr lookup_type_through_translation_units ( const string &  qn,
const corpus abi_corpus 
)

Lookup a type definition in all the translation units of a given ABI corpus.

Parameters

param qn the fully qualified name of the type to lookup.

Parameters
abi_corpusthe ABI corpus which to look the type up in.
Returns
the type definition if any was found, or a NULL pointer.

Definition at line 13486 of file abg-ir.cc.

◆ lookup_typedef_type() [1/5]

typedef_decl_sptr lookup_typedef_type ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find a typedef type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the typedef type to look for.
corpthe corpus to look into.

Definition at line 14056 of file abg-ir.cc.

◆ lookup_typedef_type() [2/5]

typedef_decl_sptr lookup_typedef_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a typedef type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the typedef type to look for.
tuthe translation unit to look into.
Returns
the typedef type found or nil if no typedef type was found.

Definition at line 12554 of file abg-ir.cc.

◆ lookup_typedef_type() [3/5]

typedef_decl_sptr lookup_typedef_type ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find a typedef type which has the same qualified name as a given typedef type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe typedef type which has the same qualified name as the typedef type we are looking for.
corpthe corpus to look into.

Definition at line 14037 of file abg-ir.cc.

◆ lookup_typedef_type() [4/5]

typedef_decl_sptr lookup_typedef_type ( const string &  type_name,
const translation_unit tu 
)

Lookup a typedef type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the typedef type to look for.
tuthe translation unit to look into.
Returns
the typedef type found or nil if no typedef type was found.

Definition at line 12574 of file abg-ir.cc.

◆ lookup_typedef_type() [5/5]

typedef_decl_sptr lookup_typedef_type ( const typedef_decl t,
const corpus corp 
)

Look into a given corpus to find a typedef type which has the same qualified name as a given typedef type.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
tthe typedef type which has the same qualified name as the typedef type we are looking for.
corpthe corpus to look into.

Definition at line 14018 of file abg-ir.cc.

◆ lookup_typedef_type_per_location() [1/2]

typedef_decl_sptr lookup_typedef_type_per_location ( const interned_string loc,
const corpus corp 
)

Lookup a typedef_decl from a corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the typedef_decl found, if any.

Definition at line 14077 of file abg-ir.cc.

◆ lookup_typedef_type_per_location() [2/2]

typedef_decl_sptr lookup_typedef_type_per_location ( const string &  loc,
const corpus corp 
)

Lookup a typedef_decl from a corpus, by its location.

Parameters
locthe location to consider.
corpthe corpus to consider.
Returns
the typedef_decl found, if any.

Definition at line 14094 of file abg-ir.cc.

◆ lookup_union_type() [1/4]

union_decl_sptr lookup_union_type ( const interned_string type_name,
const corpus corp 
)

Look into a given corpus to find a union type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.

Definition at line 13851 of file abg-ir.cc.

◆ lookup_union_type() [2/4]

union_decl_sptr lookup_union_type ( const interned_string type_name,
const translation_unit tu 
)

Lookup a union type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
type_namethe name of the union type to look for.
tuthe translation unit to look into.
Returns
the union type found or nil if no union type was found.

Definition at line 12448 of file abg-ir.cc.

◆ lookup_union_type() [3/4]

union_decl_sptr lookup_union_type ( const string &  fqn,
const translation_unit tu 
)

Lookup a union type from a translation unit.

This is done by looking the type up in the type map that is maintained in the translation unit. So this is as fast as possible.

Parameters
fqnthe fully qualified name of the type to lookup.
tuthe translation unit to look into.
Returns
the union type found or nil if no union type was found.

Definition at line 12466 of file abg-ir.cc.

◆ lookup_union_type() [4/4]

union_decl_sptr lookup_union_type ( const string &  type_name,
const corpus corp 
)

Look into a given corpus to find a union type which has a given qualified name.

If the per-corpus type map is non-empty (because the corpus allows the One Definition Rule) then the type islooked up in that per-corpus type map. Otherwise, the type is looked-up in each translation unit.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.

Definition at line 13874 of file abg-ir.cc.

◆ lookup_union_type_per_location() [1/2]

union_decl_sptr lookup_union_type_per_location ( const interned_string loc,
const corpus corp 
)

Lookup a union type in a given corpus, from its location.

Parameters
locthe location of the union type to look for.
corpthe corpus to look it from.
Returns
the resulting union_decl.

Definition at line 12481 of file abg-ir.cc.

◆ lookup_union_type_per_location() [2/2]

union_decl_sptr lookup_union_type_per_location ( const string &  loc,
const corpus corp 
)

Lookup a union type in a given corpus, from its location.

Parameters
locthe location of the union type to look for.
corpthe corpus to look it from.
Returns
the resulting union_decl.

Definition at line 12498 of file abg-ir.cc.

◆ lookup_union_types() [1/2]

const type_base_wptrs_type * lookup_union_types ( const interned_string qualified_name,
const corpus corp 
)

Look into a given corpus to find the union type*s* that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of union types named qualified_name.

Definition at line 13770 of file abg-ir.cc.

◆ lookup_union_types() [2/2]

const type_base_wptrs_type * lookup_union_types ( const string &  qualified_name,
const corpus corp 
)

Look into a given corpus to find the union types that have a given qualified name.

Parameters
qualified_namethe qualified name of the type to look for.
corpthe corpus to look into.
Returns
the vector of union types which name is qualified_name.

Definition at line 13801 of file abg-ir.cc.

◆ lookup_var_decl_in_scope() [1/2]

const decl_base_sptr lookup_var_decl_in_scope ( const std::list< string > &  comps,
const scope_decl_sptr skope 
)

lookup a var_decl in a scope.

Parameters
compsthe components of the fully qualified name of the var_decl to lookup.
skopethe scope to look into.

Definition at line 13193 of file abg-ir.cc.

◆ lookup_var_decl_in_scope() [2/2]

const decl_base_sptr lookup_var_decl_in_scope ( const string &  fqn,
const scope_decl_sptr skope 
)

Lookup a var_decl in a scope.

Parameters
fqnthe fuly qualified name of the @var_decl to lookup.
skopethe scope to look into.
Returns
the declaration of the var_decl if found, NULL otherwise.

Definition at line 12901 of file abg-ir.cc.

◆ mark_types_as_being_compared() [1/2]

void mark_types_as_being_compared ( const class_decl l,
const class_decl r 
)

Mark a pair of class_decl types as being compared.

This is helpful to later detect recursive cycles in the comparison stack.

Parameters
lthe left-hand-side operand of the comparison.

@parm r the right-hand-side operand of the comparison.

Definition at line 1066 of file abg-ir.cc.

◆ mark_types_as_being_compared() [2/2]

void mark_types_as_being_compared ( T &  l,
T &  r 
)

Mark a pair of types as being compared.

This is helpful to later detect recursive cycles in the comparison stack.

Parameters
lthe left-hand-side operand of the comparison.

@parm r the right-hand-side operand of the comparison.

Definition at line 1050 of file abg-ir.cc.

◆ maybe_compare_as_member_decls()

bool maybe_compare_as_member_decls ( const decl_base l,
const decl_base r,
change_kind k 
)

Compare the properties that belong to the "is-a-member-relation" of a decl.

For instance, access specifiers are part of the "is-a-member-relation" of a decl.

This comparison however doesn't take decl names into account. So typedefs for instance are decls that we want to compare with this function.

This function is a sub-routine of the more general 'equals' overload for instances of decl_base.

Parameters
lthe left-hand side operand of the comparison.
rthe right-hand side operand of the comparison.
Returns
true iff l compare equals, as a member decl, to r.

Definition at line 5069 of file abg-ir.cc.

◆ maybe_get_canonical_type()

T * maybe_get_canonical_type ( T *  t)

Get the canonical type of a given type T* as a T*.

Note that normally, canonical types are returned as type_base* (un-typed form, kind of). This function returns the canonical type as a T*, just like the T* it is looking at.

Parameters
tthe type to consider.
Returns
either the canonical type of t or t itself if it doesn't have any canonical type.

Definition at line 894 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [1/15]

void maybe_update_types_lookup_map ( const array_type_def::subrange_sptr subrange_type)

Update the map that associates the fully qualified name of a type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
subrange_typethe type to consider.

Definition at line 15046 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [2/15]

void maybe_update_types_lookup_map ( const array_type_def_sptr array_type)

Update the map that associates the fully qualified name of a type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
array_typethe type to consider.

Definition at line 15003 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [3/15]

void maybe_update_types_lookup_map ( const class_decl_sptr class_type)

Update the map that associates the fully qualified name of a class type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
class_typethe class type to consider.

Definition at line 14698 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [4/15]

void maybe_update_types_lookup_map ( const decl_base_sptr &  decl)

Update the map that associates the fully qualified name of a type declaration with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
declthe declaration of the type to consider.

Definition at line 15124 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [5/15]

void maybe_update_types_lookup_map ( const enum_type_decl_sptr enum_type)

Update the map that associates the fully qualified name of an enum type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
enum_typethe type to consider.

Definition at line 14784 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [6/15]

void maybe_update_types_lookup_map ( const function_type_sptr fn_type)

Update the map that associates the fully qualified name of a function type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
scopethe scope of the function type.
fn_typethe type to consider.

Definition at line 15091 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [7/15]

void maybe_update_types_lookup_map ( const pointer_type_def_sptr pointer_type)

Update the map that associates the fully qualified name of a pointer type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
pointer_typethe type to consider.

Definition at line 14904 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [8/15]

void maybe_update_types_lookup_map ( const ptr_to_mbr_type_sptr ptr_to_member)

Update the map that associates the fully qualified name of a pointer-to-member type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
ptr_to_mbr_typethe type to consider.

Definition at line 14937 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [9/15]

void maybe_update_types_lookup_map ( const qualified_type_def_sptr &  qualified_type)

Update the map that associates the fully qualified name of a qualified type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
qualified_typethe type to consider.

Definition at line 14871 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [10/15]

void maybe_update_types_lookup_map ( const reference_type_def_sptr reference_type)

Update the map that associates the fully qualified name of a reference type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
reference_typethe type to consider.

Definition at line 14970 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [11/15]

bool maybe_update_types_lookup_map ( const shared_ptr< TypeKind > &  type,
istring_type_base_wptrs_map_type types_map,
bool  use_type_name_as_key = true 
)

Update the map that associates a fully qualified name of a given type to that type.

Parameters
typethe type we are considering.
types_mapthe map to update. It's a map that assciates a fully qualified name of a type to the type itself.
use_type_name_as_keyif true, use the name of the type as the key to look it up later. If false, then use the location of the type as a key to look it up later.
Returns
true iff the type was added to the map.

Definition at line 14520 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [12/15]

void maybe_update_types_lookup_map ( const type_base_sptr &  type)

Update the map that associates the fully qualified name of a type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
typethe type to consider.

Definition at line 15169 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [13/15]

void maybe_update_types_lookup_map ( const type_decl_sptr basic_type)

Update the map that associates the fully qualified name of a basic type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
basic_typethe basic type to consider.

Definition at line 14654 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [14/15]

void maybe_update_types_lookup_map ( const typedef_decl_sptr typedef_type)

Update the map that associates the fully qualified name of a typedef type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
typedef_typethe type to consider.

Definition at line 14828 of file abg-ir.cc.

◆ maybe_update_types_lookup_map() [15/15]

void maybe_update_types_lookup_map ( const union_decl_sptr &  union_type)

Update the map that associates the fully qualified name of a union type with the type itself.

The per-translation unit type map is updated if no type with this name was already existing in that map.

If no type with this name did already exist in the per-corpus type map, then that per-corpus type map is updated. Otherwise, that type is erased from that per-corpus map.

Parameters
union_typethe union type to consider.

Definition at line 14741 of file abg-ir.cc.

◆ maybe_update_types_lookup_map< class_decl >()

bool maybe_update_types_lookup_map< class_decl > ( const class_decl_sptr class_type,
istring_type_base_wptrs_map_type map,
bool  use_type_name_as_key 
)

This is the specialization for type class_decl of the function template:

maybe_update_types_lookup_map<T>(scope_decl*, const shared_ptr<T>&, istring_type_base_wptrs_map_type&)

Parameters
class_typethe type to consider.
types_mapthe type map to update.
Returns
true iff the type was added to the map.

Definition at line 14561 of file abg-ir.cc.

◆ maybe_update_types_lookup_map< function_type >()

This is the specialization for type function_type of the function template:

maybe_update_types_lookup_map<T>(scope_decl*, const shared_ptr<T>&, istring_type_base_wptrs_map_type&)

Parameters
scopethe scope of the type to consider.
class_typethe type to consider.
types_mapthe type map to update.
Returns
true iff the type was added to the map.

Definition at line 14622 of file abg-ir.cc.

◆ member_function_has_vtable_offset()

bool member_function_has_vtable_offset ( const function_decl f)

Test if a virtual member function has a vtable offset set.

Parameters
fthe virtual member function to consider.
Returns
true iff the virtual member function has its vtable offset set, i.e, if the vtable offset of is different from -1.

Definition at line 6567 of file abg-ir.cc.

◆ odr_is_relevant()

bool odr_is_relevant ( const type_or_decl_base artifact)

By looking at the language of the TU a given ABI artifact belongs to, test if the ONE Definition Rule should apply.

To date, it applies to c++, java and ada.

Parameters
artifactthe ABI artifact to consider.
Returns
true iff the One Definition Rule should apply.

Definition at line 10207 of file abg-ir.cc.

◆ operator!=() [1/20]

bool operator!= ( const class_decl::base_spec_sptr l,
const class_decl::base_spec_sptr r 
)

Inequality operator for smart pointers to class_decl::base_specs.

This compares the pointed-to objects.

Parameters
lthe first instance to consider.
rthe second instance to consider.
Returns
true iff l is different from r.

Definition at line 26490 of file abg-ir.cc.

◆ operator!=() [2/20]

bool operator!= ( const class_decl_sptr l,
const class_decl_sptr r 
)

Turn inequality of shared_ptr of class_decl into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of class_decl on left-hand-side of the equality.
rthe shared_ptr of class_decl on right-hand-side of the equality.
Returns
true if the class_decl pointed to by the shared_ptrs are different, false otherwise.

Definition at line 26317 of file abg-ir.cc.

◆ operator!=() [3/20]

bool operator!= ( const class_or_union_sptr &  l,
const class_or_union_sptr &  r 
)

Turn inequality of shared_ptr of class_or_union into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe left-hand-side operand of the operator
rthe right-hand-side operand of the operator.
Returns
true iff l is different from r.

Definition at line 26348 of file abg-ir.cc.

◆ operator!=() [4/20]

bool operator!= ( const decl_base_sptr &  l,
const decl_base_sptr &  r 
)

Inequality operator of shared_ptr of decl_base.

This is a deep equality operator, that is, it compares the pointed-to objects, rather than just the pointers.

Parameters
lthe left-hand-side operand.
rthe right-hand-side operand.
Returns
true iff l is different from r.

Definition at line 5353 of file abg-ir.cc.

◆ operator!=() [5/20]

bool operator!= ( const elf_symbol_sptr lhs,
const elf_symbol_sptr rhs 
)

Inequality operator for smart pointers to elf_symbol.

Parameters
lhsthe first elf symbol to consider.
rhsthe second elf symbol to consider.
Returns
true iff lhs is different from rhs.

Definition at line 2856 of file abg-ir.cc.

◆ operator!=() [6/20]

bool operator!= ( const enum_type_decl_sptr l,
const enum_type_decl_sptr r 
)

Inequality operator for enum_type_decl_sptr.

Parameters
lthe first operand to compare.
rthe second operand to compare.
Returns
true iff l equals r.

Definition at line 20800 of file abg-ir.cc.

◆ operator!=() [7/20]

bool operator!= ( const function_decl::parameter_sptr l,
const function_decl::parameter_sptr r 
)

Non-member inequality operator for function_decl::parameter.

Parameters
lthe left-hand side of the equality operator
rthe right-hand side of the equality operator
Returns
true iff l and r different.

Definition at line 23600 of file abg-ir.cc.

◆ operator!=() [8/20]

bool operator!= ( const function_decl_sptr l,
const function_decl_sptr r 
)

A deep inequality operator for smart pointers to functions.

Parameters
lthe left-hand side argument of the inequality operator.

@pram r the right-hand side argument of the inequality operator.

Returns
true iff is not equal to r.

Definition at line 23347 of file abg-ir.cc.

◆ operator!=() [9/20]

bool operator!= ( const member_class_template_sptr &  l,
const member_class_template_sptr &  r 
)

Inequality operator for the member_class_template type.

Parameters
lthe first argument of the operator.
rthe second argument of the operator.
Returns
true iff the two instances are equal.

Definition at line 26679 of file abg-ir.cc.

◆ operator!=() [10/20]

bool operator!= ( const member_function_template_sptr &  l,
const member_function_template_sptr &  r 
)

Inequality operator for smart pointers to member_function_template. This is compares the pointed-to instances.

Parameters
lthe first instance to consider.
rthe second instance to consider.
Returns
true iff l equals r.

Definition at line 26573 of file abg-ir.cc.

◆ operator!=() [11/20]

bool operator!= ( const method_decl_sptr &  l,
const method_decl_sptr &  r 
)

Inequality operator for method_decl_sptr.

This is a deep equality operator, as it compares the method_decl that is pointed-to by the smart pointer.

Parameters
lthe left-hand side argument of the equality operator.
rthe righ-hand side argument of the equality operator.
Returns
true iff l differs from r.

Definition at line 25637 of file abg-ir.cc.

◆ operator!=() [12/20]

bool operator!= ( const pointer_type_def_sptr l,
const pointer_type_def_sptr r 
)

Turn inequality of shared_ptr of pointer_type_def into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of pointer_type_def on left-hand-side of the equality.
rthe shared_ptr of pointer_type_def on right-hand-side of the equality.
Returns
true iff the pointer_type_def pointed to by the shared_ptrs are different.

Definition at line 18340 of file abg-ir.cc.

◆ operator!=() [13/20]

bool operator!= ( const qualified_type_def_sptr &  l,
const qualified_type_def_sptr &  r 
)

Non-member inequality operator for qualified_type_def.

Parameters
lthe left-hand side of the equality operator
rthe right-hand side of the equality operator
Returns
true iff l and r equals.

Definition at line 17877 of file abg-ir.cc.

◆ operator!=() [14/20]

bool operator!= ( const reference_type_def_sptr l,
const reference_type_def_sptr r 
)

Turn inequality of shared_ptr of reference_type_def into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of reference_type_def on left-hand-side of the equality.
rthe shared_ptr of reference_type_def on right-hand-side of the equality.
Returns
true iff the reference_type_def pointed to by the shared_ptrs are different.

Definition at line 18791 of file abg-ir.cc.

◆ operator!=() [15/20]

bool operator!= ( const scope_decl_sptr l,
const scope_decl_sptr r 
)

Inequality operator for scope_decl_sptr.

Parameters
lthe left hand side operand of the equality operator.

@pram r the right hand side operand of the equalify operator.

Returns
true iff l equals r.

Definition at line 8360 of file abg-ir.cc.

◆ operator!=() [16/20]

bool operator!= ( const translation_unit_sptr l,
const translation_unit_sptr r 
)

A deep inequality operator for pointers to translation units.

Parameters
lthe first translation unit to consider for the comparison.
rthe second translation unit to consider for the comparison.
Returns
true iff the two translation units are different.

Definition at line 1868 of file abg-ir.cc.

◆ operator!=() [17/20]

bool operator!= ( const type_base_sptr &  l,
const type_base_sptr &  r 
)

Turn inequality of shared_ptr of type_base into a deep equality; that is, make it compare the pointed to objects..

Parameters
lthe shared_ptr of type_base on left-hand-side of the equality.
rthe shared_ptr of type_base on right-hand-side of the equality.
Returns
true iff the type_base pointed to by the shared_ptrs are different.

Definition at line 5390 of file abg-ir.cc.

◆ operator!=() [18/20]

bool operator!= ( const type_decl_sptr l,
const type_decl_sptr r 
)

Inequality operator for type_decl_sptr.

Parameters
lthe first operand to compare.
rthe second operand to compare.
Returns
true iff l is different from r.

Definition at line 17042 of file abg-ir.cc.

◆ operator!=() [19/20]

bool operator!= ( const type_or_decl_base_sptr l,
const type_or_decl_base_sptr r 
)

Non-member inequality operator for the @type_or_decl_base type.

Parameters
lthe left-hand operand of the equality.
rthe right-hand operator of the equality.
Returns
true iff l is different from r.

Definition at line 4367 of file abg-ir.cc.

◆ operator!=() [20/20]

bool operator!= ( const union_decl_sptr &  l,
const union_decl_sptr &  r 
)

Turn inequality of shared_ptr of union_decl into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe left-hand-side operand of the operator
rthe right-hand-side operand of the operator.
Returns
true iff l is different from r.

Definition at line 27318 of file abg-ir.cc.

◆ operator&() [1/5]

change_kind operator& ( change_kind  l,
change_kind  r 
)

Definition at line 5030 of file abg-ir.cc.

◆ operator&() [2/5]

corpus::origin operator& ( corpus::origin  l,
corpus::origin  r 
)

Bitwise & operator for the corpus::origin type.

Parameters
lthe left-hand side operand of the & operation.
rthe right-hand side operand of the & operation.
Returns
the result of the operation.

Definition at line 1802 of file abg-corpus.cc.

◆ operator&() [3/5]

Overloaded bitwise AND operator for CV qualifiers.

Definition at line 17906 of file abg-ir.cc.

◆ operator&() [4/5]

Bitwise AND operator for real_type::modifiers_type.

Parameters
lthe left-hand side operand.
rthe right-hand side operand.
Returns
the result of the bitwise AND.

Definition at line 16478 of file abg-ir.cc.

◆ operator&() [5/5]

bitwise "AND" operator for the type_or_decl_base::type_or_decl_kind bitmap type.

Definition at line 4051 of file abg-ir.cc.

◆ operator&=() [1/5]

change_kind & operator&= ( change_kind l,
change_kind  r 
)

Definition at line 5044 of file abg-ir.cc.

◆ operator&=() [2/5]

corpus::origin operator&= ( corpus::origin l,
corpus::origin  r 
)

Bitwise &= operator for the corpus::origin type.

Parameters
lthe left-hand side operand of the &= operation.
rthe right-hand side operand of the &= operation.
Returns
the result of the operation.

Definition at line 1816 of file abg-corpus.cc.

◆ operator&=() [3/5]

Overloaded bitwise &= operator for cv qualifiers.

Definition at line 17898 of file abg-ir.cc.

◆ operator&=() [4/5]

Bitwise &= operator for real_type::modifiers_type.

Parameters
lthe left-hand side operand.
rthe right-hand side operand.
Returns
the result of the bitwise &=.

Definition at line 16520 of file abg-ir.cc.

◆ operator&=() [5/5]

bitwise "A&=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.

Definition at line 4061 of file abg-ir.cc.

◆ operator<<() [1/7]

std::ostream & operator<< ( std::ostream &  o,
access_specifier  a 
)

Streaming operator for class_decl::access_specifier.

Parameters
othe output stream to serialize the access specifier to.
athe access specifier to serialize.
Returns
the output stream.

Definition at line 26714 of file abg-ir.cc.

◆ operator<<() [2/7]

std::ostream & operator<< ( std::ostream &  o,
decl_base::binding  b 
)

Streaming operator for decl_base::binding.

Parameters
othe output stream to serialize the visibility to.
bthe binding to serialize.
Returns
the output stream.

Definition at line 5296 of file abg-ir.cc.

◆ operator<<() [3/7]

std::ostream & operator<< ( std::ostream &  o,
decl_base::visibility  v 
)

Streaming operator for the decl_base::visibility.

Parameters
othe output stream to serialize the visibility to.
vthe visibility to serialize.
Returns
the output stream.

Definition at line 5264 of file abg-ir.cc.

◆ operator<<() [4/7]

std::ostream & operator<< ( std::ostream &  o,
elf_symbol::binding  b 
)

Serialize an instance of symbol_binding and stream it to a given output stream.

Parameters
othe output stream to serialize the symbole type to.
bthe symbol binding to serialize.

Definition at line 2985 of file abg-ir.cc.

◆ operator<<() [5/7]

std::ostream & operator<< ( std::ostream &  o,
elf_symbol::type  t 
)

Serialize an instance of symbol_type and stream it to a given output stream.

Parameters
othe output stream to serialize the symbole type to.
tthe symbol type to serialize.

Definition at line 2935 of file abg-ir.cc.

◆ operator<<() [6/7]

std::ostream & operator<< ( std::ostream &  o,
elf_symbol::visibility  v 
)

Serialize an instance of elf_symbol::visibility and stream it to a given output stream.

Parameters
othe output stream to serialize the symbole type to.
vthe symbol visibility to serialize.

Definition at line 3023 of file abg-ir.cc.

◆ operator<<() [7/7]

std::ostream & operator<< ( std::ostream &  o,
qualified_type_def::CV  cv 
)

Streaming operator for qualified_type_decl::CV.

Parameters
othe output stream to serialize the cv qualifier to.
cvthe cv qualifier to serialize.
Returns
the output stream used.

Definition at line 17924 of file abg-ir.cc.

◆ operator==() [1/21]

bool operator== ( const class_decl::base_spec_sptr l,
const class_decl::base_spec_sptr r 
)

Equality operator for smart pointers to class_decl::base_specs.

This compares the pointed-to objects.

Parameters
lthe first instance to consider.
rthe second instance to consider.
Returns
true iff l equals r.

Definition at line 26468 of file abg-ir.cc.

◆ operator==() [2/21]

bool operator== ( const class_decl_sptr l,
const class_decl_sptr r 
)

Turn equality of shared_ptr of class_decl into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of class_decl on left-hand-side of the equality.
rthe shared_ptr of class_decl on right-hand-side of the equality.
Returns
true if the class_decl pointed to by the shared_ptrs are equal, false otherwise.

Definition at line 26295 of file abg-ir.cc.

◆ operator==() [3/21]

bool operator== ( const class_or_union_sptr &  l,
const class_or_union_sptr &  r 
)

Turn equality of shared_ptr of class_or_union into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe left-hand-side operand of the operator
rthe right-hand-side operand of the operator.
Returns
true iff l equals r.

Definition at line 26329 of file abg-ir.cc.

◆ operator==() [4/21]

bool operator== ( const decl_base_sptr &  l,
const decl_base_sptr &  r 
)

Turn equality of shared_ptr of decl_base into a deep equality; that is, make it compare the pointed to objects, not just the pointers.

Parameters
lthe shared_ptr of decl_base on left-hand-side of the equality.
rthe shared_ptr of decl_base on right-hand-side of the equality.
Returns
true if the decl_base pointed to by the shared_ptrs are equal, false otherwise.

Definition at line 5332 of file abg-ir.cc.

◆ operator==() [5/21]

bool operator== ( const elf_symbol_sptr lhs,
const elf_symbol_sptr rhs 
)

Equality operator for smart pointers to elf_symbol.

Parameters
lhsthe first elf symbol to consider.
rhsthe second elf symbol to consider.
Returns
true iff lhs equals rhs.

Definition at line 2837 of file abg-ir.cc.

◆ operator==() [6/21]

bool operator== ( const enum_type_decl_sptr l,
const enum_type_decl_sptr r 
)

Equality operator for enum_type_decl_sptr.

Parameters
lthe first operand to compare.
rthe second operand to compare.
Returns
true iff l equals r.

Definition at line 20782 of file abg-ir.cc.

◆ operator==() [7/21]

bool operator== ( const function_decl::parameter_sptr l,
const function_decl::parameter_sptr r 
)

Non-member equality operator for function_decl::parameter.

Parameters
lthe left-hand side of the equality operator
rthe right-hand side of the equality operator
Returns
true iff l and r equals.

Definition at line 23582 of file abg-ir.cc.

◆ operator==() [8/21]

bool operator== ( const function_decl_sptr l,
const function_decl_sptr r 
)

A deep comparison operator for a shared pointer to function_decl.

This function compares to shared pointers to function_decl by looking at the pointed-to instances of function_dec comparing them too. If the two pointed-to objects are equal then this function returns true.

Parameters
lthe left-hand side argument of the equality operator.
rthe right-hand side argument of the equality operator.
Returns
true iff l equals r.

Definition at line 23329 of file abg-ir.cc.

◆ operator==() [9/21]

bool operator== ( const member_class_template_sptr &  l,
const member_class_template_sptr &  r 
)

Comparison operator for the member_class_template type.

Parameters
lthe first argument of the operator.
rthe second argument of the operator.
Returns
true iff the two instances are equal.

Definition at line 26659 of file abg-ir.cc.

◆ operator==() [10/21]

bool operator== ( const member_function_template_sptr &  l,
const member_function_template_sptr &  r 
)

Equality operator for smart pointers to member_function_template. This is compares the pointed-to instances.

Parameters
lthe first instance to consider.
rthe second instance to consider.
Returns
true iff l equals r.

Definition at line 26552 of file abg-ir.cc.

◆ operator==() [11/21]

bool operator== ( const method_decl_sptr &  l,
const method_decl_sptr &  r 
)

Equality operator for method_decl_sptr.

This is a deep equality operator, as it compares the method_decl that is pointed-to by the smart pointer.

Parameters
lthe left-hand side argument of the equality operator.
rthe righ-hand side argument of the equality operator.
Returns
true iff l equals r.

Definition at line 25616 of file abg-ir.cc.

◆ operator==() [12/21]

bool operator== ( const pointer_type_def_sptr l,
const pointer_type_def_sptr r 
)

Turn equality of shared_ptr of pointer_type_def into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of pointer_type_def on left-hand-side of the equality.
rthe shared_ptr of pointer_type_def on right-hand-side of the equality.
Returns
true if the pointer_type_def pointed to by the shared_ptrs are equal, false otherwise.

Definition at line 18318 of file abg-ir.cc.

◆ operator==() [13/21]

bool operator== ( const qualified_type_def_sptr &  l,
const qualified_type_def_sptr &  r 
)

Non-member equality operator for qualified_type_def.

Parameters
lthe left-hand side of the equality operator
rthe right-hand side of the equality operator
Returns
true iff l and r equals.

Definition at line 17859 of file abg-ir.cc.

◆ operator==() [14/21]

bool operator== ( const reference_type_def_sptr l,
const reference_type_def_sptr r 
)

Turn equality of shared_ptr of reference_type_def into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of reference_type_def on left-hand-side of the equality.
rthe shared_ptr of reference_type_def on right-hand-side of the equality.
Returns
true if the reference_type_def pointed to by the shared_ptrs are equal, false otherwise.

Definition at line 18769 of file abg-ir.cc.

◆ operator==() [15/21]

bool operator== ( const scope_decl_sptr l,
const scope_decl_sptr r 
)

Equality operator for scope_decl_sptr.

Parameters
lthe left hand side operand of the equality operator.

@pram r the right hand side operand of the equalify operator.

Returns
true iff l equals r.

Definition at line 8343 of file abg-ir.cc.

◆ operator==() [16/21]

bool operator== ( const translation_unit_sptr l,
const translation_unit_sptr r 
)

A deep comparison operator for pointers to translation units.

Parameters
lthe first translation unit to consider for the comparison.
rthe second translation unit to consider for the comparison.
Returns
true if the two translation units are equal, false otherwise.

Definition at line 1849 of file abg-ir.cc.

◆ operator==() [17/21]

bool operator== ( const type_base_sptr &  l,
const type_base_sptr &  r 
)

Turn equality of shared_ptr of type_base into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe shared_ptr of type_base on left-hand-side of the equality.
rthe shared_ptr of type_base on right-hand-side of the equality.
Returns
true if the type_base pointed to by the shared_ptrs are equal, false otherwise.

Definition at line 5368 of file abg-ir.cc.

◆ operator==() [18/21]

bool operator== ( const type_decl_sptr l,
const type_decl_sptr r 
)

Equality operator for type_decl_sptr.

Parameters
lthe first operand to compare.
rthe second operand to compare.
Returns
true iff l equals r.

Definition at line 17025 of file abg-ir.cc.

◆ operator==() [19/21]

bool operator== ( const type_or_decl_base lr,
const type_or_decl_base rr 
)

Non-member equality operator for the @type_or_decl_base type.

Parameters
lrthe left-hand operand of the equality.
rrthe right-hand operatnr of the equality.
Returns
true iff lr equals rr.

Definition at line 4314 of file abg-ir.cc.

◆ operator==() [20/21]

bool operator== ( const type_or_decl_base_sptr l,
const type_or_decl_base_sptr r 
)

Non-member equality operator for the @type_or_decl_base type.

Parameters
lthe left-hand operand of the equality.
rthe right-hand operatnr of the equality.
Returns
true iff l equals r.

Definition at line 4348 of file abg-ir.cc.

◆ operator==() [21/21]

bool operator== ( const union_decl_sptr &  l,
const union_decl_sptr &  r 
)

Turn equality of shared_ptr of union_decl into a deep equality; that is, make it compare the pointed to objects too.

Parameters
lthe left-hand-side operand of the operator
rthe right-hand-side operand of the operator.
Returns
true iff l equals r.

Definition at line 27299 of file abg-ir.cc.

◆ operator|() [1/5]

change_kind operator| ( change_kind  l,
change_kind  r 
)

Definition at line 5023 of file abg-ir.cc.

◆ operator|() [2/5]

corpus::origin operator| ( corpus::origin  l,
corpus::origin  r 
)

Bitwise | operator for the corpus::origin type.

Parameters
lthe left-hand side operand of the | operation.
rthe right-hand side operand of the | operation.
Returns
the result of the operation.

Definition at line 1774 of file abg-corpus.cc.

◆ operator|() [3/5]

Overloaded bitwise OR operator for cv qualifiers.

Definition at line 17882 of file abg-ir.cc.

◆ operator|() [4/5]

Bitwise OR operator for real_type::modifiers_type.

Parameters
lthe left-hand side operand.
rthe right-hand side operand.
Returns
the result of the bitwise OR.

Definition at line 16463 of file abg-ir.cc.

◆ operator|() [5/5]

bitwise "OR" operator for the type_or_decl_base::type_or_decl_kind bitmap type.

Definition at line 4031 of file abg-ir.cc.

◆ operator|=() [1/5]

change_kind & operator|= ( change_kind l,
change_kind  r 
)

Definition at line 5037 of file abg-ir.cc.

◆ operator|=() [2/5]

corpus::origin operator|= ( corpus::origin l,
corpus::origin  r 
)

Bitwise |= operator for the corpus::origin type.

Parameters
lthe left-hand side operand for the |= operation.
rthe right-hand side operand for the |= operation.
Returns
the result of the operation.

Definition at line 1788 of file abg-corpus.cc.

◆ operator|=() [3/5]

Overloaded bitwise |= operator for cv qualifiers.

Definition at line 17890 of file abg-ir.cc.

◆ operator|=() [4/5]

Bitwise |= operator for real_type::modifiers_type.

Parameters
lthe left-hand side operand.
rthe right-hand side operand.
Returns
the result of the bitwise |=.

Definition at line 16506 of file abg-ir.cc.

◆ operator|=() [5/5]

bitwise "|=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.

Definition at line 4041 of file abg-ir.cc.

◆ operator~() [1/2]

Overloaded bitwise inverting operator for CV qualifiers.

Definition at line 17914 of file abg-ir.cc.

◆ operator~() [2/2]

Bitwise one's complement operator for real_type::modifiers_type.

Parameters
lthe left-hand side operand.
rthe right-hand side operand.
Returns
the result of the bitwise one's complement operator.

Definition at line 16493 of file abg-ir.cc.

◆ parse_real_type()

bool parse_real_type ( const string &  str,
real_type type 
)

Parse a real type from a string.

Parameters
strthe string containing the real type to parse.
typethe resulting real_type. Is set to the result of the parse, iff the function returns true.
Returns
true iff the function could parse a real type from str.

Definition at line 16686 of file abg-ir.cc.

◆ peek_hash_value()

hash_t peek_hash_value ( const type_or_decl_base artefact)

Get the hash value associated to an IR node.

Unlike type_or_decl_base::hash_value(), if the IR has no associated hash value, an empty hash value is returned.

Parameters
artefactthe IR node to consider.
Returns
the hash value stored on the IR node or an empty hash if no hash value is stored in the artefact.

Definition at line 28461 of file abg-ir.cc.

◆ peel_array_type() [1/2]

const type_base * peel_array_type ( const type_base type)

Return the leaf element type of an array.

If the element type is itself an array, then recursively return the element type of that array itself.

Parameters
typethe array type to consider. If this is not an array type, this type is returned by the function.
Returns
the leaf element type of the array type, or, if it's not an array type, then just return .

Definition at line 7242 of file abg-ir.cc.

◆ peel_array_type() [2/2]

const type_base_sptr peel_array_type ( const type_base_sptr &  type)

Return the leaf element type of an array.

If the element type is itself an array, then recursively return the element type of that array itself.

Parameters
typethe array type to consider. If this is not an array type, this type is returned by the function.
Returns
the leaf element type of the array type, or, if it's not an array type, then just return .

Definition at line 7222 of file abg-ir.cc.

◆ peel_const_qualified_type()

type_base_sptr peel_const_qualified_type ( const qualified_type_def_sptr &  q)

If a qualified type is const, then return its underlying type.

Parameters
qthe qualified type to consider.
Returns
the underlying type of q if it's a const-qualified type, otherwise, return q itself.

Definition at line 7333 of file abg-ir.cc.

◆ peel_pointer_or_reference_type()

type_base * peel_pointer_or_reference_type ( const type_base type,
bool  peel_qual_type 
)

Return the leaf underlying or pointed-to type node of a, pointer_type_def, reference_type_def or qualified_type_def type node.

Parameters
typethe type to peel.
peel_qualified_typeif true, also peel qualified types.
Returns
the leaf underlying or pointed-to type node of type.

Definition at line 7511 of file abg-ir.cc.

◆ peel_pointer_type() [1/2]

const type_base * peel_pointer_type ( const type_base type)

Return the leaf pointed-to type node of a pointer_type_def node.

If the pointed-to type of a pointer_type_def node is itself a pointer_type_def node, then recursively look at the pointed-to type nodes to get the first one that is not a a pointer_type_def node. This is what a leaf pointed-to type node means.

Otherwise, if the pointed-to type node of pointer_type_def is *NOT* a pointer_type_def node, then just return the pointed-to type node.

And if the type node considered is not a pointer_type_def node, then just return it.

Returns
the leaf pointed-to type node of a type.

Definition at line 7146 of file abg-ir.cc.

◆ peel_pointer_type() [2/2]

type_base_sptr peel_pointer_type ( const type_base_sptr &  type)

Return the leaf pointed-to type node of a pointer_type_def node.

If the pointed-to type of a pointer_type_def node is itself a pointer_type_def node, then recursively look at the pointed-to type nodes to get the first one that is not a a pointer_type_def node. This is what a leaf pointed-to type node means.

Otherwise, if the pointed-to type node of pointer_type_def is *NOT* a pointer_type_def node, then just return the pointed-to type node.

And if the type node considered is not a pointer_type_def node, then just return it.

Returns
the leaf pointed-to type node of a type.

Definition at line 7117 of file abg-ir.cc.

◆ peel_qualified_or_typedef_type() [1/2]

type_base * peel_qualified_or_typedef_type ( const type_base type)

Return the leaf underlying type of a qualified or typedef type.

If the underlying type is itself a qualified or typedef type, then recursively return the first underlying type of that qualified or typedef type to return the first underlying type that is not a qualified or typedef type.

If the underlying type is NOT a qualified nor a typedef type, then just return that underlying type.

Parameters
typethe qualified or typedef type to consider.
Returns
the leaf underlying type.

Definition at line 7358 of file abg-ir.cc.

◆ peel_qualified_or_typedef_type() [2/2]

type_base_sptr peel_qualified_or_typedef_type ( const type_base_sptr &  t)

Return the leaf underlying type of a qualified or typedef type.

If the underlying type is itself a qualified or typedef type, then recursively return the first underlying type of that qualified or typedef type to return the first underlying type that is not a qualified or typedef type.

If the underlying type is NOT a qualified nor a typedef type, then just return that underlying type.

Parameters
typethe qualified or typedef type to consider.
Returns
the leaf underlying type.

Definition at line 7386 of file abg-ir.cc.

◆ peel_qualified_type() [1/2]

const type_base * peel_qualified_type ( const type_base type)

Return the leaf underlying type of a qualified type.

If the underlying type is itself a qualified type, then recursively return the first underlying type of that qualified type to return the first underlying type that is not a qualified type.

If the underlying type is NOT a qualified type, then just return that underlying type.

Parameters
typethe qualified type to consider.
Returns
the leaf underlying type.

Definition at line 7264 of file abg-ir.cc.

◆ peel_qualified_type() [2/2]

const type_base_sptr peel_qualified_type ( const type_base_sptr &  type)

Return the leaf underlying type of a qualified type.

If the underlying type is itself a qualified type, then recursively return the first underlying type of that qualified type to return the first underlying type that is not a qualified type.

If the underlying type is NOT a qualified type, then just return that underlying type.

Parameters
typethe qualified type to consider.
Returns
the leaf underlying type.

Definition at line 7286 of file abg-ir.cc.

◆ peel_reference_type() [1/2]

const type_base * peel_reference_type ( const type_base type)

Return the leaf pointed-to type node of a reference_type_def node.

If the pointed-to type of a reference_type_def node is itself a reference_type_def node, then recursively look at the pointed-to type nodes to get the first one that is not a a reference_type_def node. This is what a leaf pointed-to type node means.

Otherwise, if the pointed-to type node of reference_type_def is *NOT* a reference_type_def node, then just return the pointed-to type node.

And if the type node considered is not a reference_type_def node, then just return it.

Returns
the leaf pointed-to type node of a type.

Definition at line 7202 of file abg-ir.cc.

◆ peel_reference_type() [2/2]

type_base_sptr peel_reference_type ( const type_base_sptr &  type)

Return the leaf pointed-to type node of a reference_type_def node.

If the pointed-to type of a reference_type_def node is itself a reference_type_def node, then recursively look at the pointed-to type nodes to get the first one that is not a a reference_type_def node. This is what a leaf pointed-to type node means.

Otherwise, if the pointed-to type node of reference_type_def is *NOT* a reference_type_def node, then just return the pointed-to type node.

And if the type node considered is not a reference_type_def node, then just return it.

Returns
the leaf pointed-to type node of a type.

Definition at line 7173 of file abg-ir.cc.

◆ peel_typedef_pointer_or_reference_type() [1/3]

type_base * peel_typedef_pointer_or_reference_type ( const type_base type)

Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def or reference_type_def node.

Parameters
typethe type to peel.
Returns
the leaf underlying or pointed-to type node of type.

Definition at line 7441 of file abg-ir.cc.

◆ peel_typedef_pointer_or_reference_type() [2/3]

type_base * peel_typedef_pointer_or_reference_type ( const type_base type,
bool  peel_qual_type 
)

Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def or reference_type_def node.

Parameters
typethe type to peel.
Returns
the leaf underlying or pointed-to type node of type.

Definition at line 7472 of file abg-ir.cc.

◆ peel_typedef_pointer_or_reference_type() [3/3]

type_base_sptr peel_typedef_pointer_or_reference_type ( const type_base_sptr  type)

Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def, reference_type_def, or array_type_def node.

Parameters
typethe type to peel.
Returns
the leaf underlying or pointed-to type node of type.

Definition at line 7409 of file abg-ir.cc.

◆ peel_typedef_type() [1/2]

const type_base * peel_typedef_type ( const type_base type)

Return the leaf underlying type node of a typedef_decl node.

If the underlying type of a typedef_decl node is itself a typedef_decl node, then recursively look at the underlying type nodes to get the first one that is not a a typedef_decl node. This is what a leaf underlying type node means.

Otherwise, if the underlying type node of typedef_decl is *NOT* a typedef_decl node, then just return the underlying type node.

And if the type node considered is not a typedef_decl node, then just return it.

Returns
the leaf underlying type node of a type.

Definition at line 7090 of file abg-ir.cc.

◆ peel_typedef_type() [2/2]

type_base_sptr peel_typedef_type ( const type_base_sptr &  type)

Return the leaf underlying type node of a typedef_decl node.

If the underlying type of a typedef_decl node is itself a typedef_decl node, then recursively look at the underlying type nodes to get the first one that is not a a typedef_decl node. This is what a leaf underlying type node means.

Otherwise, if the underlying type node of typedef_decl is *NOT* a typedef_decl node, then just return the underlying type node.

And if the type node considered is not a typedef_decl node, then just return it.

Returns
the leaf underlying type node of a type.

Definition at line 7063 of file abg-ir.cc.

◆ pop_composite_type_comparison_operands()

void pop_composite_type_comparison_operands ( const type_base left,
const type_base right 
)

Pop a pair of operands from the stack of operands to the current type comparison.

For more information on this, please look at the description of the environment::privright_type_comp_operands_ data member.

Parameters
leftthe left-hand-side comparison operand we expect to pop from the top of the stack. If this doesn't match the operand found on the top of the stack, the function aborts.
rightthe right-hand-side comparison operand we expect to pop from the bottom of the stack. If this doesn't match the operand found on the top of the stack, the function aborts.

Definition at line 332 of file abg-ir.cc.

◆ push_composite_type_comparison_operands()

void push_composite_type_comparison_operands ( const type_base left,
const type_base right 
)

Push a pair of operands on the stack of operands of the current type comparison, during type canonicalization.

For more information on this, please look at the description of the environment::priv::right_type_comp_operands_ data member.

Parameters
leftthe left-hand-side comparison operand to push.
rightthe right-hand-side comparison operand to push.

Definition at line 311 of file abg-ir.cc.

◆ remove_decl_from_scope()

void remove_decl_from_scope ( decl_base_sptr  decl)

Remove a given decl from its scope.

Parameters
declthe decl to remove from its scope.

Definition at line 8475 of file abg-ir.cc.

◆ return_comparison_result()

bool return_comparison_result ( T &  l,
T &  r,
bool  value 
)

Return the result of the comparison of two (sub) types.

The function does the necessary book keeping before returning the result of the comparison of two (sub) types.

The book-keeping done is essentially about type comparison cycle detection.

Parameters
lthe left-hand-side operand of the type comparison
rthe right-hand-side operand of the type comparison
valuethe result of the comparison of l and r.
Returns
the value value.

Definition at line 1127 of file abg-ir.cc.

◆ set_data_member_is_laid_out()

void set_data_member_is_laid_out ( var_decl_sptr  m,
bool  l 
)

Set a flag saying if a data member is laid out.

Parameters
mthe data member to consider.
ltrue if m is to be considered as laid out.

Definition at line 6330 of file abg-ir.cc.

◆ set_data_member_offset()

void set_data_member_offset ( var_decl_sptr  m,
uint64_t  o 
)

Set the offset of a data member into its containing class.

Parameters
mthe data member to consider.
othe offset, in bits.

Definition at line 6167 of file abg-ir.cc.

◆ set_member_access_specifier() [1/2]

void set_member_access_specifier ( const decl_base_sptr &  d,
access_specifier  a 
)

Sets the access specifier for a class member.

Parameters
dthe class member to set the access specifier for. Note that this must be a class member otherwise the function aborts the current process.
athe new access specifier to set the class member to.

Definition at line 5563 of file abg-ir.cc.

◆ set_member_access_specifier() [2/2]

void set_member_access_specifier ( decl_base d,
access_specifier  a 
)

Sets the access specifier for a class member.

Parameters
dthe class member to set the access specifier for. Note that this must be a class member otherwise the function aborts the current process.
athe new access specifier to set the class member to.

Definition at line 5544 of file abg-ir.cc.

◆ set_member_function_is_const() [1/2]

void set_member_function_is_const ( const function_decl_sptr f,
bool  is_const 
)

set the const-ness property of a member function.

Parameters
fthe function to set.
is_constthe new value of the const-ness property of f

Definition at line 6557 of file abg-ir.cc.

◆ set_member_function_is_const() [2/2]

void set_member_function_is_const ( function_decl f,
bool  is_const 
)

set the const-ness property of a member function.

Parameters
fthe function to set.
is_constthe new value of the const-ness property of f

Definition at line 6538 of file abg-ir.cc.

◆ set_member_function_is_ctor() [1/2]

void set_member_function_is_ctor ( const function_decl_sptr f,
bool  c 
)

Setter for the is_ctor property of the member function.

Parameters
fthe member function to set.
fthe new boolean value of the is_ctor property. Is true if f is a constructor, false otherwise.

Definition at line 6445 of file abg-ir.cc.

◆ set_member_function_is_ctor() [2/2]

void set_member_function_is_ctor ( function_decl f,
bool  c 
)

Setter for the is_ctor property of the member function.

Parameters
fthe member function to set.
fthe new boolean value of the is_ctor property. Is true if f is a constructor, false otherwise.

Definition at line 6425 of file abg-ir.cc.

◆ set_member_function_is_dtor() [1/2]

void set_member_function_is_dtor ( const function_decl_sptr f,
bool  d 
)

Set the destructor-ness property of a member function.

Parameters
fthe function to set.
dtrue if f is a destructor, false otherwise.

Definition at line 6501 of file abg-ir.cc.

◆ set_member_function_is_dtor() [2/2]

void set_member_function_is_dtor ( function_decl f,
bool  d 
)

Set the destructor-ness property of a member function.

Parameters
fthe function to set.
dtrue if f is a destructor, false otherwise.

Definition at line 6482 of file abg-ir.cc.

◆ set_member_function_virtuality() [1/3]

void set_member_function_virtuality ( const function_decl_sptr fn,
bool  is_virtual,
ssize_t  voffset 
)

Set the virtual-ness of a member fcuntion.

Parameters
fnthe member function to consider.
is_virtualwhether the function is virtual.
voffsetthe virtual offset of the virtual function.

Definition at line 6749 of file abg-ir.cc.

◆ set_member_function_virtuality() [2/3]

void set_member_function_virtuality ( function_decl fn,
bool  is_virtual,
ssize_t  voffset 
)

Set the virtual-ness of a member fcuntion.

Parameters
fnthe member function to consider.
is_virtualwhether the function is virtual.
voffsetthe virtual offset of the virtual function.

Definition at line 6715 of file abg-ir.cc.

◆ set_member_function_virtuality() [3/3]

void set_member_function_virtuality ( function_decl fn,
bool  is_virtual,
ssize_t  voffset 
)

Set the virtual-ness of a member fcuntion.

Parameters
fnthe member function to consider.
is_virtualwhether the function is virtual.
voffsetthe virtual offset of the virtual function.

Definition at line 6733 of file abg-ir.cc.

◆ set_member_is_static() [1/2]

void set_member_is_static ( const decl_base_sptr &  d,
bool  s 
)

Sets the static-ness property of a class member.

Parameters
dthe class member to set the static-ness property for. Note that this must be a class member otherwise the function aborts the current process.
sthis must be true if the member is to be static, false otherwise.

Definition at line 26838 of file abg-ir.cc.

◆ set_member_is_static() [2/2]

void set_member_is_static ( decl_base d,
bool  s 
)

Sets the static-ness property of a class member.

Parameters
dthe class member to set the static-ness property for. Note that this must be a class member otherwise the function aborts the current process.
sthis must be true if the member is to be static, false otherwise.

Definition at line 26747 of file abg-ir.cc.

◆ set_or_get_cached_hash_value() [1/2]

hash_t set_or_get_cached_hash_value ( const T &  tod)

Set the hash value of an IR node and return it.

If the IR node already has a hash value set, this function just returns it. Otherwise, the function computes a new hash value and sets it to the IR node.

Note that if the IR node is a non-canonicalizeable type, no hash value is computed and an empty hash is returned.

This is a sub-routine of the type_or_decl_base::hash_value() virtual member functions.

Parameters
type_or_declthe IR node to compute the value for.
Returns
the hash value computed and set to the IR node, or the hash value the IR node already had.

Definition at line 414 of file abg-ir-priv.h.

◆ set_or_get_cached_hash_value() [2/2]

hash_t set_or_get_cached_hash_value ( const T *  artifact)

Set the hash value of an IR node and return it.

If the IR node already has a hash value set, this function just returns it. Otherwise, the function computes a new hash value and sets it to the IR node.

Note that if the IR node is a non-canonicalizeable type, no hash value is computed and an empty hash is returned.

This is a sub-routine of the type_or_decl_base::hash_value() virtual member functions.

Parameters
type_or_declthe IR node to compute the value for.
Returns
the hash value computed and set to the IR node, or the hash value the IR node already had.

Definition at line 439 of file abg-ir-priv.h.

◆ sort_and_canonicalize_types()

void sort_and_canonicalize_types ( IteratorType  begin,
IteratorType  end,
deref_lambda  deref 
)

Sort and canonicalize a sequence of types.

Note that this function does NOT hash the types. It thus assumes that the types are allready hashed.

Operations must be done in that order (sorting and then canonicalizing) to get predictable results.

Parameters
beginan iterator pointing to the first element of the sequence of types to hash and canonicalize.
beginan iterator pointing past-the-end of the sequence of types to hash and canonicalize.
derefthis is a lambda that is used to dereference the types contained in the sequence referenced by iterators begin and end.

Definition at line 1580 of file abg-ir-priv.h.

◆ sort_types()

void sort_types ( const canonical_type_sptr_set_type types,
vector< type_base_sptr > &  result 
)

Sort types in a hopefully stable manner.

Parameters
typesa set of types with canonical types to sort.
resultthe resulting sorted vector.

Definition at line 3448 of file abg-ir.cc.

◆ sort_types_for_hash_computing_and_c14n() [1/2]

void sort_types_for_hash_computing_and_c14n ( IteratorType  begin,
IteratorType  end 
)

Sort types before hashing (and then canonicalizing) them.

Parameters
beginan iterator pointing to the beginning of the sequence of types to sort.
endan iterator pointing to the end of the sequence of types to sort.

Definition at line 1417 of file abg-ir-priv.h.

◆ sort_types_for_hash_computing_and_c14n() [2/2]

void sort_types_for_hash_computing_and_c14n ( vector< type_base_sptr > &  types)

Sort types right before hashing and canonicalizing them.

Parameters
typesthe vector of types to sort.

Definition at line 30007 of file abg-ir.cc.

◆ string_to_elf_symbol_binding()

bool string_to_elf_symbol_binding ( const string &  s,
elf_symbol::binding b 
)

Convert a string representing a an elf symbol binding into an elf_symbol::binding.

Parameters
sthe string to convert.
bthe resulting elf_symbol::binding.
Returns
true iff the conversion completed successfully.

Definition at line 3097 of file abg-ir.cc.

◆ string_to_elf_symbol_type()

bool string_to_elf_symbol_type ( const string &  s,
elf_symbol::type t 
)

Convert a string representing a symbol type into an elf_symbol::type.

Parameters
sthe string to convert.
tthe resulting elf_symbol::type.
Returns
true iff the conversion completed successfully.

Definition at line 3064 of file abg-ir.cc.

◆ string_to_elf_symbol_visibility()

bool string_to_elf_symbol_visibility ( const string &  s,
elf_symbol::visibility v 
)

Convert a string representing a an elf symbol visibility into an elf_symbol::visibility.

Parameters
sthe string to convert.
bthe resulting elf_symbol::visibility.
Returns
true iff the conversion completed successfully.

Definition at line 3122 of file abg-ir.cc.

◆ string_to_translation_unit_language()

translation_unit::language string_to_translation_unit_language ( const string &  l)

Parse a string representing a language into a translation_unit::language enumerator into a string.

Parameters
lthe string representing the language.
Returns
the resulting translation_unit::language enumerator.

Definition at line 1670 of file abg-ir.cc.

◆ strip_redundant_quals_from_underyling_types()

void strip_redundant_quals_from_underyling_types ( const qualified_type_def_sptr &  t)

Merge redundant qualifiers from a tree of qualified types.

Suppose a tree of qualified types leads to:

const virtual const restrict const int;

Suppose the IR tree of qualified types ressembles (with C meaning const, V meaning virtual and R meaning restrict):

[C|V]–>[C|R] –>[C] –> [int].

This function walks the IR and remove the redundant CV qualifiers so the IR becomes:

[C|V] –> [R] –> [] –>[int].

Note that the empty qualified type (noted []) represents a qualified type with no qualifier. It's rare, but it can exist. I've put it here just for the sake of example.

The resulting IR thus represents the (merged) type:

const virtual restrict int.

Parameters
tthe qualified type to consider. The IR below the argument to this parameter will be edited to remove redundant qualifiers where applicable.

Definition at line 7038 of file abg-ir.cc.

◆ strip_typedef()

type_base_sptr strip_typedef ( const type_base_sptr  type)

Recursively returns the the underlying type of a typedef. The return type should not be a typedef of anything anymore.

Also recursively strip typedefs from the sub-types of the type given in arguments.

Note that this function builds types in which typedefs are stripped off. Usually, types are held by their scope, so their life time is bound to the life time of their scope. But as this function cannot really insert the built type into it's scope, it must ensure that the newly built type stays live long enough.

So, if the newly built type has a canonical type, this function returns the canonical type. Otherwise, this function ensure that the newly built type has a life time that is the same as the life time of the entire libabigail library.

Parameters
typethe type to strip the typedefs from.
Returns
the resulting type stripped from its typedefs, or just return type if it has no typedef in any of its sub-types.

Definition at line 6780 of file abg-ir.cc.

◆ strip_useless_const_qualification()

decl_base_sptr strip_useless_const_qualification ( const qualified_type_def_sptr  t)

Strip qualification from a qualified type, when it makes sense.

DWARF constructs "const reference". This is redundant because a reference is always const. It also constructs the useless "const void" type. The issue is these redundant types then leak into the IR and make for bad diagnostics.

This function thus strips the const qualifier from the type in that case. It might contain code to strip other cases like this in the future.

Parameters
tthe type to strip const qualification from.
Returns
the stripped type or just return t.

Definition at line 6915 of file abg-ir.cc.

◆ synthesize_function_type_from_translation_unit()

function_type_sptr synthesize_function_type_from_translation_unit ( const function_type fn_type,
translation_unit tu 
)

In a translation unit, lookup the sub-types that make up a given function type and if the sub-types are all found, synthesize and return a function_type with them.

This function is like lookup_function_type_in_translation_unit() execept that it constructs the function type from the sub-types found in the translation, rather than just looking for the function types held by the translation unit. This can be useful if the translation unit doesnt hold the function type we are looking for (i.e, lookup_function_type_in_translation_unit() returned NULL) but we still want to see if the sub-types of the function types are present in the translation unit.

Parameters
fn_typethe function type to consider.
tuthe translation unit to look into.
Returns
the resulting synthesized function type if all its sub-types have been found, NULL otherwise.

Definition at line 15280 of file abg-ir.cc.

◆ synthesize_type_from_translation_unit()

type_base_sptr synthesize_type_from_translation_unit ( const type_base_sptr &  type,
translation_unit tu 
)

In a translation unit, lookup a given type or synthesize it if it's a qualified type.

So this function first looks the type up in the translation unit. If it's found, then OK, it's returned. Otherwise, if it's a qualified, reference or pointer or function type (a composite type), lookup the underlying type, synthesize the type we want from it and return it.

If the underlying types is not not found, then give up and return nil.

Returns
the type that was found or the synthesized type.

Definition at line 15197 of file abg-ir.cc.

◆ translation_unit_language_to_string()

string translation_unit_language_to_string ( translation_unit::language  l)

Converts a translation_unit::language enumerator into a string.

Parameters
lthe language enumerator to translate.
Returns
the resulting string.

Definition at line 1540 of file abg-ir.cc.

◆ try_canonical_compare()

bool try_canonical_compare ( const T *  l,
const T *  r 
)

Compare two types by comparing their canonical types if present.

If the canonical types are not present (because the types have not yet been canonicalized, for instance) then the types are compared structurally.

Parameters
lthe first type to take into account in the comparison.
rthe second type to take into account in the comparison.

Definition at line 914 of file abg-ir.cc.

◆ type_has_non_canonicalized_subtype()

type_base * type_has_non_canonicalized_subtype ( type_base_sptr  t)

Test if a type has sub-types that are non-canonicalized.

Parameters
tthe type which sub-types to consider.
Returns
true if a type has sub-types that are non-canonicalized.

Definition at line 28289 of file abg-ir.cc.

◆ type_has_sub_type_changes()

bool type_has_sub_type_changes ( const type_base_sptr  t_v1,
const type_base_sptr  t_v2 
)

Tests if the change of a given type effectively comes from just its sub-types. That is, if the type has changed but its type name hasn't changed, then the change of the type mostly likely is a sub-type change.

Parameters
t_v1the first version of the type.
t_v2the second version of the type.
Returns
true iff the type changed and the change is about its sub-types.

Definition at line 28311 of file abg-ir.cc.

◆ type_is_suitable_for_hash_computing()

bool type_is_suitable_for_hash_computing ( const type_base t)

Test if we should attempt to compute a hash value for a given type.

For now this function returns true only for types originating from ELF. For types originating from ABIXML, for instance, the function return false, meaning that types originating from ABIXML should NOT be hashed.

Parameters
tthe type to consider.
Returns
true iff type should be considered for hashing.

Definition at line 15751 of file abg-ir.cc.

◆ type_or_void()

type_base_sptr type_or_void ( const type_base_sptr  t,
const environment env 
)

Return either the type given in parameter if it's non-null, or the void type.

Parameters
tthe type to consider.
envthe environment to use. If NULL, just abort the process.
Returns
either t if it is non-null, or the void type.

Definition at line 15384 of file abg-ir.cc.

◆ type_originates_from_corpus()

bool type_originates_from_corpus ( type_base_sptr  t,
corpus_sptr &  c 
)

Test if a type originates from a corpus.

Note that this function supports testing if a type originates from a corpus group.

Parameters
tthe type to consider.
cthe corpus or corpus group to consider.
Returns
true iff the type t originates from the corpus (or group) c.

Definition at line 378 of file abg-ir.cc.

◆ types_are_compatible() [1/2]

bool types_are_compatible ( const decl_base_sptr  d1,
const decl_base_sptr  d2 
)

Test if two types are equal modulo a typedef.

Type A and B are compatible if

  • A and B are equal
  • or if one type is a typedef of the other one.
Parameters
type1the declaration of the first type to consider.
type2the declaration of the second type to consider.
Returns
true iff type1 and type2 are compatible.

Definition at line 10450 of file abg-ir.cc.

◆ types_are_compatible() [2/2]

bool types_are_compatible ( const type_base_sptr  type1,
const type_base_sptr  type2 
)

Test if two types are equal modulo a typedef or CV qualifiers.

Type A and B are compatible if

  • A and B are equal
  • or A and B are integral types with harmless name change
  • or if one type is a typedef of the other one.
  • or if one type is the CV qualified version of the other
  • or if A and B are classes with the same layout.
  • or if A and B are pointers, references or arrays of compatible types
Parameters
type1the first type to consider.
type2the second type to consider.
Returns
true iff type1 and type2 are compatible.

Definition at line 10357 of file abg-ir.cc.

◆ types_have_similar_structure() [1/2]

bool types_have_similar_structure ( const type_base first,
const type_base second,
bool  indirect_type 
)

Test if two types have similar structures, even though they are (or can be) different.

const and volatile qualifiers are completely ignored.

typedef are resolved to their definitions; their names are ignored.

Two indirect types (pointers, references or arrays) have similar structure if their underlying types are of the same kind and have the same name. In the indirect types case, the size of the underlying type does not matter.

Two direct types (i.e, non indirect) have a similar structure if they have the same kind, name and size. Two class types have similar structure if they have the same name, size, and if the types of their data members have similar types.

Parameters
firstthe first type to consider.
secondthe second type to consider.
indirect_typeif true, then consider first and second as being underlying types of indirect types. Meaning that their size does not matter.
Returns
true iff first and second have similar structures.

Definition at line 28735 of file abg-ir.cc.

◆ types_have_similar_structure() [2/2]

bool types_have_similar_structure ( const type_base_sptr &  first,
const type_base_sptr &  second,
bool  indirect_type 
)

Test if two types have similar structures, even though they are (or can be) different.

const and volatile qualifiers are completely ignored.

typedef are resolved to their definitions; their names are ignored.

Two indirect types (pointers or references) have similar structure if their underlying types are of the same kind and have the same name. In the indirect types case, the size of the underlying type does not matter.

Two direct types (i.e, non indirect) have a similar structure if they have the same kind, name and size. Two class types have similar structure if they have the same name, size, and if the types of their data members have similar types.

Parameters
firstthe first type to consider.
secondthe second type to consider.
indirect_typewhether to do an indirect comparison
Returns
true iff first and second have similar structures.

Definition at line 28703 of file abg-ir.cc.

◆ unmark_types_as_being_compared() [1/2]

void unmark_types_as_being_compared ( const class_decl l,
const class_decl r 
)

Mark a pair of class_decl types as being not compared anymore.

This is helpful to later detect recursive cycles in the comparison stack.

Note that the types must have been passed to mark_types_as_being_compared prior to calling this function.

Parameters
lthe left-hand-side operand of the comparison.

@parm r the right-hand-side operand of the comparison.

Definition at line 1105 of file abg-ir.cc.

◆ unmark_types_as_being_compared() [2/2]

void unmark_types_as_being_compared ( T &  l,
T &  r 
)

Mark a pair of types as being not compared anymore.

This is helpful to later detect recursive cycles in the comparison stack.

Note that the types must have been passed to mark_types_as_being_compared prior to calling this function.

Parameters
lthe left-hand-side operand of the comparison.

@parm r the right-hand-side operand of the comparison.

Definition at line 1085 of file abg-ir.cc.

◆ var_equals_modulo_types()

bool var_equals_modulo_types ( const var_decl l,
const var_decl r,
change_kind k 
)

Compares two instances of var_decl without taking their type into account.

If the two intances are different modulo their type, set a bitfield to give some insight about the kind of differences there are.

Parameters
lthe first artifact of the comparison.
rthe second artifact of the comparison.
ka pointer to a bitfield that gives information about the kind of changes there are between l and r. This one is set iff k is non-null and the function returns false.

Please note that setting k to a non-null value does have a negative performance impact because even if l and r are not equal, the function keeps up the comparison in order to determine the different kinds of ways in which they are different.

Returns
true if l equals r, false otherwise.

Definition at line 21468 of file abg-ir.cc.