libabigail
Namespaces | Classes | Typedefs | Enumerations | Functions
abigail::comparison Namespace Reference

utilities to compare abi artifacts More...

Namespaces

 filtering
 Facilities to walk, categorize and possibly filter nodes of the diff tree.
 

Classes

class  array_diff
 The abstraction of a diff between two arrays. More...
 
class  base_diff
 An abstraction of a diff between two instances of class_decl::base_spec. More...
 
struct  base_diff_comp
 A comparison function for instances of base_diff. More...
 
struct  base_spec_comp
 A functor to compare instances of class_decl::base_spec. More...
 
struct  changed_enumerator_comp
 A functor to compare two changed enumerators, based on their initial value. More...
 
class  class_diff
 This type abstracts changes for a class_decl. More...
 
class  class_or_union_diff
 This is the base class of class_diff and union_diff. More...
 
class  corpus_diff
 An abstraction of a diff between between two abi corpus. More...
 
struct  data_member_comp
 A comparison functor to compare two data members based on their offset. More...
 
struct  data_member_diff_comp
 A comparison functor to compare two instances of var_diff that represent changed data members based on the offset of the initial data members, or if equal, based on their qualified name. If equal again, then the offset and qualified name of the new data members are considered. More...
 
class  decl_diff_base
 The base class of diff between decls. More...
 
class  default_reporter
 The default, initial, reporter of the libabigail comparison engine. More...
 
class  diff
 The abstraction of a change between two ABI artifacts, a.k.a an artifact change. More...
 
struct  diff_comp
 A comparison functor for instances of diff. More...
 
class  diff_context
 The context of the diff. This type holds various bits of information that is going to be used throughout the diffing of two entities and the reporting that follows. More...
 
struct  diff_equal
 A comparison functor for using diff_sptr and diff* in a hash map or set. More...
 
struct  diff_hash
 A hashing functor for using diff_sptr and diff* in a hash map or set. More...
 
struct  diff_less_than_functor
 A functor to compare two instances of diff_sptr. More...
 
class  diff_maps
 This type contains maps. Each map associates a type name to a diff of that type. Not all kinds of diffs are present; only those that carry leaf changes are, for now. More...
 
class  diff_node_visitor
 The base class for the node visitors. These are the types used to visit each node traversed by the diff_traversable_base::traverse() method. More...
 
struct  diff_sptr_hasher
 Hasher for diff_sptr. More...
 
class  diff_traversable_base
 The base class for the diff classes that are to be traversed. More...
 
class  distinct_diff
 An abstraction of a diff between entities that are of a different kind (disctinct). More...
 
struct  elf_symbol_comp
 A functor to compare instances of elf_symbol base on their names. More...
 
class  enum_diff
 Abstraction of a diff between two enums. More...
 
struct  enumerator_value_comp
 A functor to compare two enumerators based on their value. This implements the "less than" operator. More...
 
class  fn_parm_diff
 Abstraction of a diff between two function parameters. More...
 
struct  fn_parm_diff_comp
 A comparison functor to compare two instances of fn_parm_diff based on their indexes. More...
 
struct  function_comp
 "Less than" functor to compare instances of function_decl. More...
 
class  function_decl_diff
 Abstraction of a diff between two function_decl. More...
 
struct  function_decl_diff_comp
 A "Less Than" functor to compare instance of function_decl_diff. More...
 
class  function_type_diff
 Abstraction of a diff between two function types. More...
 
class  leaf_reporter
 A reporter that only reports leaf changes. More...
 
struct  parm_comp
 Functor that compares two function parameters for the purpose of sorting them. More...
 
class  pointer_diff
 The abstraction of a diff between two pointers. More...
 
class  qualified_type_diff
 Abstraction of a diff between two qualified types. More...
 
class  reference_diff
 The abstraction of a diff between two references. More...
 
class  reporter_base
 The base class of all the reporting classes. More...
 
class  scope_diff
 An abstractions of the changes between two scopes. More...
 
class  subrange_diff
 The abstraction of the diff between two subrange types. More...
 
class  translation_unit_diff
 An abstraction of a diff between two translation units. More...
 
class  type_decl_diff
 Abstraction of a diff between two basic type declarations. More...
 
class  type_diff_base
 The base class of diff between types. More...
 
class  typedef_diff
 Abstraction of a diff between two typedef_decl. More...
 
struct  types_or_decls_equal
 An equality functor for types_or_decls_type. More...
 
struct  types_or_decls_hash
 A hashing functor for types_or_decls_type. More...
 
class  union_diff
 
struct  var_comp
 A functor to compare instances of var_decl base on their qualified names. More...
 
class  var_diff
 Abstracts a diff between two instances of var_decl. More...
 
struct  var_diff_sptr_comp
 Functor to sort instances of var_diff_sptr. More...
 
struct  virtual_member_function_diff_comp
 A comparison functor for instances of function_decl_diff that represent changes between two virtual member functions. More...
 

Typedefs

typedef shared_ptr< array_diffarray_diff_sptr
 Convenience typedef for a shared pointer on a array_diff type. More...
 
typedef shared_ptr< base_diffbase_diff_sptr
 Convenience typedef for a shared pointer to a base_diff type. More...
 
typedef vector< base_diff_sptrbase_diff_sptrs_type
 Convenience typedef for a vector of base_diff_sptr. More...
 
typedef std::pair< enum_type_decl::enumerator, enum_type_decl::enumerator > changed_enumerator
 Convenience typedef for a changed enumerator. The first element of the pair is the old enumerator and the second one is the new enumerator. More...
 
typedef vector< changed_enumeratorchanged_enumerators_type
 Convenience typedef for a vector of changed enumerators. More...
 
typedef pair< method_decl_sptr, method_decl_sptr > changed_member_function_sptr
 Convenience typedef for a pair of class_decl::member_function_sptr representing a changed member function. The first element of the pair is the initial member function and the second element is the changed one. More...
 
typedef std::pair< var_decl *, var_decl * > changed_var_ptr
 Convenience typedef for a pair of pointer to var_decl representing a var_decl change. The first member of the pair represents the initial variable and the second member represents the changed variable. More...
 
typedef std::pair< var_decl_sptr, var_decl_sptrchanged_var_sptr
 Convenience typedef for a pair of var_decl_sptr representing a var_decl change. The first member of the pair represents the initial variable and the second member represents the changed variable. More...
 
typedef vector< changed_var_sptrchanged_var_sptrs_type
 Convenience typedef for a vector of @changed_var_sptr.gg381. More...
 
typedef shared_ptr< class_diffclass_diff_sptr
 Convenience typedef for a shared pointer on a class_diff type. More...
 
typedef shared_ptr< corpus_diffcorpus_diff_sptr
 A convenience typedef for a shared pointer to corpus_diff. More...
 
typedef shared_ptr< decl_diff_basedecl_diff_base_sptr
 Convenience typedef for a shared_ptr of decl_diff_base. More...
 
typedef vector< decl_diff_base_sptrdecl_diff_base_sptrs_type
 Convenience typedef for a vector of decl_diff_base_sptr. More...
 
typedef shared_ptr< default_reporterdefault_reporter_sptr
 A convenience typedef for a shared_ptr to a default_reporter. More...
 
typedef unordered_map< const diff *, artifact_sptr_set_type, diff_hash, diff_equaldiff_artifact_set_map_type
 A convenience typedef for an unordered_map which key is a diff* and which value is a artifact_sptr_set_type. More...
 
typedef shared_ptr< diff_contextdiff_context_sptr
 Convenience typedef for a shared pointer of diff_context. More...
 
typedef weak_ptr< diff_contextdiff_context_wptr
 Convenience typedef for a weak pointer of diff_context. More...
 
typedef vector< diff * > diff_ptrs_type
 Convenience typedef for a vector of diff*. More...
 
typedef shared_ptr< diffdiff_sptr
 Convenience typedef for a shared_ptr for the diff class. More...
 
typedef vector< diff_sptrdiff_sptrs_type
 Convenience typedef for a vector of diff_sptr. More...
 
typedef shared_ptr< diff_traversable_basediff_traversable_base_sptr
 Convenience typedef for shared_ptr on diff_traversable_base. More...
 
typedef weak_ptr< diffdiff_wptr
 Convenience typedef for a weak_ptr for the diff class. More...
 
typedef shared_ptr< distinct_diffdistinct_diff_sptr
 Convenience typedef for a shared pointer to distinct_types_diff. More...
 
typedef shared_ptr< enum_diffenum_diff_sptr
 
typedef shared_ptr< fn_parm_difffn_parm_diff_sptr
 Convenience typedef for a shared pointer to a fn_parm_diff type. More...
 
typedef shared_ptr< function_decl_difffunction_decl_diff_sptr
 Convenience typedef for a shared pointer to a function_decl type. More...
 
typedef vector< function_decl_diff_sptrfunction_decl_diff_sptrs_type
 Convenience typedef for a vector of function_decl_diff_sptr. More...
 
typedef shared_ptr< function_type_difffunction_type_diff_sptr
 A convenience typedef for a shared pointer to function_type_type_diff. More...
 
typedef shared_ptr< pointer_diffpointer_diff_sptr
 Convenience typedef for a shared pointer on a pointer_diff type. More...
 
typedef unordered_map< size_t, size_t > pointer_map
 Convenience typedef for a map of pointer values. The Key is a pointer value and the value is potentially another pointer value associated to the first one. More...
 
typedef class shared_ptr< qualified_type_diffqualified_type_diff_sptr
 
typedef shared_ptr< reference_diffreference_diff_sptr
 Convenience typedef for a shared pointer on a reference_diff type. More...
 
typedef shared_ptr< reporter_basereporter_base_sptr
 A convenience typedef for a shared pointer to a reporter_base. More...
 
typedef shared_ptr< scope_diffscope_diff_sptr
 Convenience typedef for a shared pointer on a scope_diff. More...
 
typedef unordered_map< string, base_diff_sptrstring_base_diff_sptr_map
 Convenience typedef for a map of string and base_diff_sptr. More...
 
typedef unordered_map< string, class_decl::base_spec_sptrstring_base_sptr_map
 Convenience typedef for a map of string and class_decl::basse_spec_sptr. More...
 
typedef unordered_map< string, changed_enumeratorstring_changed_enumerator_map
 Convenience typedef for a map which value is a changed enumerator. The key is the name of the changed enumerator. More...
 
typedef unordered_map< string, changed_member_function_sptrstring_changed_member_function_sptr_map
 Convenience typedef for a hash map of strings and changed member functions. 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 unordered_map< string, decl_diff_base_sptrstring_decl_diff_base_sptr_map
 Convenience typedef for a map which value is a decl_diff_base_sptr. The key of the map is the qualified name of the changed type. More...
 
typedef unordered_map< string, diff * > string_diff_ptr_map
 Convenience typedef for a map which value is a diff*. The key of the map is the qualified name of the changed type. More...
 
typedef unordered_map< string, diff_sptrstring_diff_sptr_map
 Convenience typedef for a map which value is a diff_sptr. The key of the map is the qualified name of the changed type. More...
 
typedef unordered_map< string, elf_symbol_sptrstring_elf_symbol_map
 Convenience typedef for a map whose key is a string and whose value is an elf_symbol_sptr. More...
 
typedef unordered_map< string, enum_type_decl::enumerator > string_enumerator_map
 Convenience typedef for a map which value is an enumerator. The key is the name of the enumerator. More...
 
typedef unordered_map< string, fn_parm_diff_sptrstring_fn_parm_diff_sptr_map
 Convenience typedef for a map which value is a changed function parameter and which key is the name of the function parameter. More...
 
typedef unordered_map< string, function_decl_diff_sptrstring_function_decl_diff_sptr_map
 Convenience typedef for a map which key is a string and which value is a function_decl_diff_sptr. More...
 
typedef unordered_map< string, function_decl * > string_function_ptr_map
 Convenience typedef for a map which key is a string and which value is a pointer to decl_base. More...
 
typedef unordered_map< string, method_decl_sptr > string_member_function_sptr_map
 Convenience typedef for a hash map of strings and member functions. More...
 
typedef unordered_map< string, function_decl::parameter_sptrstring_parm_map
 Convenience typedef for a map which value is a function parameter. The key is the name of the function parm. More...
 
typedef unordered_map< string, type_base_sptr > string_type_base_sptr_map
 Convenience typedef for a map which key is a string and which value is a type_base_sptr. More...
 
typedef unordered_map< string, type_diff_base_sptrstring_type_diff_base_sptr_map
 Convenience typedef for a map which value is a type_diff_base_sptr. The key of the map is the qualified name of the changed type. More...
 
typedef unordered_map< string, var_diff_sptrstring_var_diff_ptr_map
 Convenience typedef for a map which key is a string and which value is a var_diff_sptr. More...
 
typedef unordered_map< string, var_diff_sptrstring_var_diff_sptr_map
 Convenience typedef for a map whose key is a string and whose value is a changed variable of type var_diff_sptr. More...
 
typedef unordered_map< string, var_decl * > string_var_ptr_map
 Convenience typedef for a map which key is a string and which value is a point to var_decl. More...
 
typedef shared_ptr< subrange_diffsubrange_diff_sptr
 A convenience typedef for a shared pointer to subrange_diff type. More...
 
typedef shared_ptr< translation_unit_difftranslation_unit_diff_sptr
 Convenience typedef for a shared pointer on a translation_unit_diff type. More...
 
typedef shared_ptr< type_decl_difftype_decl_diff_sptr
 Convenience typedef for a shared pointer on a type_decl_diff type. More...
 
typedef shared_ptr< type_diff_basetype_diff_base_sptr
 Convenience pointer for a shared pointer to a type_diff_base. More...
 
typedef vector< type_diff_base_sptrtype_diff_base_sptrs_type
 Convenience typedef for a vector of type_diff_base_sptr. More...
 
typedef shared_ptr< typedef_difftypedef_diff_sptr
 Convenience typedef for a shared pointer on a typedef_diff type. More...
 
typedef unordered_map< types_or_decls_type, diff_sptr, types_or_decls_hash, types_or_decls_equaltypes_or_decls_diff_map_type
 A convenience typedef for a map of types_or_decls_type and diff_sptr. More...
 
typedef std::pair< const type_or_decl_base_sptr, const type_or_decl_base_sptrtypes_or_decls_type
 Convenience typedef for a pair of decls or types. More...
 
typedef shared_ptr< union_diffunion_diff_sptr
 
typedef unordered_set< diff_sptr, diff_sptr_hasherunordered_diff_sptr_set
 Convenience typedef for an unoredered set of diff_sptr. More...
 
typedef unordered_map< unsigned, decl_base_sptr > unsigned_decl_base_sptr_map
 Convenience typedef for a map which key is an unsigned integer and which value is a decl_base_sptr. More...
 
typedef unordered_map< unsigned, fn_parm_diff_sptrunsigned_fn_parm_diff_sptr_map
 Convenience typedef for a map which key is an integer and which value is a changed parameter. More...
 
typedef unordered_map< unsigned, function_decl::parameter_sptrunsigned_parm_map
 Convenience typedef for a map which key is an integer and which value is a parameter. More...
 
typedef unordered_map< unsigned, var_diff_sptrunsigned_var_diff_sptr_map
 Convenience typedef for a map whose key is an unsigned int and whose value is a changed variable of type var_diff_sptr. More...
 
typedef shared_ptr< var_diffvar_diff_sptr
 Convenience typedef for a shared pointer to a var_diff type. More...
 
typedef vector< var_diff_sptrvar_diff_sptrs_type
 Convenience typedef for a vector of var_diff_sptr. More...
 

Enumerations

enum  diff_category {
  NO_CHANGE_CATEGORY , ACCESS_CHANGE_CATEGORY , COMPATIBLE_TYPE_CHANGE_CATEGORY , HARMLESS_DECL_NAME_CHANGE_CATEGORY ,
  NON_VIRT_MEM_FUN_CHANGE_CATEGORY , STATIC_DATA_MEMBER_CHANGE_CATEGORY , HARMLESS_ENUM_CHANGE_CATEGORY , HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY ,
  HARMLESS_UNION_CHANGE_CATEGORY , HARMLESS_DATA_MEMBER_CHANGE_CATEGORY , SUPPRESSED_CATEGORY , PRIVATE_TYPE_CATEGORY ,
  SIZE_OR_OFFSET_CHANGE_CATEGORY , VIRTUAL_MEMBER_CHANGE_CATEGORY , REDUNDANT_CATEGORY , TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY ,
  FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY , FN_PARM_TYPE_CV_CHANGE_CATEGORY , FN_RETURN_TYPE_CV_CHANGE_CATEGORY , FN_PARM_ADD_REMOVE_CHANGE_CATEGORY ,
  VAR_TYPE_CV_CHANGE_CATEGORY , VOID_PTR_TO_PTR_CHANGE_CATEGORY , BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY , HAS_ALLOWED_CHANGE_CATEGORY ,
  HAS_DESCENDANT_WITH_ALLOWED_CHANGE_CATEGORY , HAS_PARENT_WITH_ALLOWED_CHANGE_CATEGORY , EVERYTHING_CATEGORY
}
 An enum for the different categories that a diff tree node falls into, regarding the kind of changes it represents. More...
 
enum  diff_kind { del_kind , ins_kind , subtype_change_kind , change_kind }
 Represent the kind of difference we want report_mem_header() to report. More...
 
enum  visiting_kind { DEFAULT_VISITING_KIND , SKIP_CHILDREN_VISITING_KIND , DO_NOT_MARK_VISITED_NODES_AS_VISITED }
 An enum for the different ways to visit a diff tree node. More...
 

Functions

void apply_filters (corpus_diff_sptr diff_tree)
 Apply the diff tree filters that have been associated to the context of the a given corpus_diff tree. As a result, the nodes of the @diff tree are going to be categorized into one of several of the categories of diff_category. More...
 
void apply_suppressions (const corpus_diff *diff_tree)
 Walk a corpus_diff tree and appply the suppressions carried by the context. If the suppression applies to a given node then categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization. More...
 
void apply_suppressions (corpus_diff_sptr diff_tree)
 Walk a diff tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization. More...
 
void apply_suppressions (diff *diff_tree)
 Walk a given diff-sub tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization. More...
 
void apply_suppressions (diff_sptr diff_tree)
 Walk a given diff-sub tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization. More...
 
void categorize_redundancy (corpus_diff *diff_tree)
 Walk a given corpus_diff tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY. More...
 
void categorize_redundancy (corpus_diff_sptr diff_tree)
 Walk a given corpus_diff tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY. More...
 
void categorize_redundancy (diff *diff_tree)
 Walk a given diff sub-tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY. More...
 
void categorize_redundancy (diff_sptr diff_tree)
 Walk a given diff sub-tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY. More...
 
void clear_redundancy_categorization (corpus_diff *diff_tree)
 Walk a given corpus_diff tree to clear the REDUNDANT_CATEGORY out of the category of the nodes. More...
 
void clear_redundancy_categorization (corpus_diff_sptr diff_tree)
 Walk a given corpus_diff tree to clear the REDUNDANT_CATEGORY out of the category of the nodes. More...
 
void clear_redundancy_categorization (diff *diff_tree)
 Walk a given diff sub-tree to clear the REDUNDANT_CATEGORY out of the category of the nodes. More...
 
void clear_redundancy_categorization (diff_sptr diff_tree)
 Walk a given diff sub-tree to clear the REDUNDANT_CATEGORY out of the category of the nodes. More...
 
subrange_diff_sptr compute_diff (array_type_def::subrange_sptr first, array_type_def::subrange_sptr second, diff_context_sptr ctxt)
 Compute the diff between two instances of subrange_diff. More...
 
array_diff_sptr compute_diff (array_type_def_sptr first, array_type_def_sptr second, diff_context_sptr ctxt)
 Compute the diff between two arrays. More...
 
base_diff_sptr compute_diff (const class_decl::base_spec_sptr first, const class_decl::base_spec_sptr second, diff_context_sptr ctxt)
 Constructs the diff object representing a diff between two base class specifications. More...
 
class_diff_sptr compute_diff (const class_decl_sptr first, const class_decl_sptr second, diff_context_sptr ctxt)
 Compute the set of changes between two instances of class_decl. More...
 
corpus_diff_sptr compute_diff (const corpus_group_sptr &f, const corpus_group_sptr &s, diff_context_sptr ctxt)
 Compute the diff between two instances of corpus_group. More...
 
corpus_diff_sptr compute_diff (const corpus_sptr f, const corpus_sptr s, diff_context_sptr ctxt)
 Compute the diff between two instances of corpus. More...
 
diff_sptr compute_diff (const decl_base_sptr first, const decl_base_sptr second, diff_context_sptr ctxt)
 Compute the difference between two decls. The decls can represent either type declarations, or non-type declaration. More...
 
enum_diff_sptr compute_diff (const enum_type_decl_sptr first, const enum_type_decl_sptr second, diff_context_sptr ctxt)
 Compute the set of changes between two instances of enum_type_decl. More...
 
fn_parm_diff_sptr compute_diff (const function_decl::parameter_sptr first, const function_decl::parameter_sptr second, diff_context_sptr ctxt)
 Compute the difference between two function_decl::parameter_sptr; that is, between two function parameters. Return a resulting fn_parm_diff_sptr that represents the changes. More...
 
function_decl_diff_sptr compute_diff (const function_decl_sptr first, const function_decl_sptr second, diff_context_sptr ctxt)
 Compute the diff between two function_decl. More...
 
function_type_diff_sptr compute_diff (const function_type_sptr first, const function_type_sptr second, diff_context_sptr ctxt)
 Compute the diff between two instances of function_type. More...
 
qualified_type_diff_sptr compute_diff (const qualified_type_def_sptr first, const qualified_type_def_sptr second, diff_context_sptr ctxt)
 Compute the diff between two qualified types. More...
 
scope_diff_sptr compute_diff (const scope_decl_sptr first, const scope_decl_sptr second, scope_diff_sptr d, diff_context_sptr ctxt)
 Compute the diff between two scopes. More...
 
scope_diff_sptr compute_diff (const scope_decl_sptr first_scope, const scope_decl_sptr second_scope, diff_context_sptr ctxt)
 Compute the diff between two scopes. More...
 
translation_unit_diff_sptr compute_diff (const translation_unit_sptr first, const translation_unit_sptr second, diff_context_sptr ctxt)
 Compute the diff between two translation_units. More...
 
diff_sptr compute_diff (const type_base_sptr first, const type_base_sptr second, diff_context_sptr ctxt)
 Compute the difference between two types. More...
 
type_decl_diff_sptr compute_diff (const type_decl_sptr first, const type_decl_sptr second, diff_context_sptr ctxt)
 Compute a diff between two type_decl. More...
 
typedef_diff_sptr compute_diff (const typedef_decl_sptr first, const typedef_decl_sptr second, diff_context_sptr ctxt)
 Compute a diff between two typedef_decl. More...
 
union_diff_sptr compute_diff (const union_decl_sptr first, const union_decl_sptr second, diff_context_sptr ctxt)
 Compute the difference between two union_decl types. More...
 
var_diff_sptr compute_diff (const var_decl_sptr first, const var_decl_sptr second, diff_context_sptr ctxt)
 Compute the diff between two instances of var_decl. More...
 
pointer_diff_sptr compute_diff (pointer_type_def_sptr first, pointer_type_def_sptr second, diff_context_sptr ctxt)
 Compute the diff between between two pointers. More...
 
reference_diff_sptr compute_diff (reference_type_def_sptr first, reference_type_def_sptr second, diff_context_sptr ctxt)
 Compute the diff between two references. More...
 
distinct_diff_sptr compute_diff_for_distinct_kinds (const type_or_decl_base_sptr first, const type_or_decl_base_sptr second, diff_context_sptr ctxt)
 Try to diff entities that are of distinct kinds. More...
 
uint64_t convert_bits_to_bytes (size_t bits)
 Convert a number in bits into a number in bytes. More...
 
void emit_num_value (uint64_t value, const diff_context &ctxt, ostream &out)
 Emit a numerical value to an output stream. More...
 
diff_category get_default_harmful_categories_bitmap ()
 Getter of a bitmap made of the set of change categories that are considered harmful. More...
 
diff_category get_default_harmless_categories_bitmap ()
 Getter of a bitmap made of the set of change categories that are considered harmless. More...
 
diffget_fn_decl_or_var_decl_diff_ancestor (const diff *)
 
type_base_sptr get_leaf_type (qualified_type_def_sptr t)
 Return the first underlying type that is not a qualified type. More...
 
string get_pretty_representation (diff *d)
 Get a copy of the pretty representation of a diff node. More...
 
const diffget_typedef_diff_underlying_type_diff (const diff *diff)
 Return the leaf underlying diff node of a typedef_diff node. More...
 
bool has_basic_type_change_only (const diff *d)
 Test if a diff node is a decl diff that only carries a basic type change on its type diff sub-node. More...
 
const class_or_union_diffis_anonymous_class_or_union_diff (const diff *d)
 Test if a diff node is a class_or_union_diff between two anonymous classes or unions. More...
 
const array_diffis_array_diff (const diff *diff)
 Test if a diff node is a array_diff node. More...
 
const base_diffis_base_diff (const diff *diff)
 Test if a diff node is about differences between two base class specifiers. More...
 
bool is_child_node_of_base_diff (const diff *diff)
 Test if a diff node is a child node of a base diff node. More...
 
bool is_child_node_of_function_parm_diff (const diff *diff)
 Test if a diff node is a child node of a function parameter diff node. More...
 
const class_diffis_class_diff (const diff *diff)
 Test if a diff node is a class_diff node. More...
 
const class_or_union_diffis_class_or_union_diff (const diff *d)
 Test if a diff node is a class_or_union_diff node. More...
 
const corpus_diffis_corpus_diff (const diff *diff)
 Test if a diff node is a corpus_diff node. More...
 
const decl_diff_baseis_decl_diff (const diff *diff)
 Test if a diff node is about differences between declarations. More...
 
const type_decl_diffis_diff_of_basic_type (const diff *d)
 Test if a diff node represents a diff between two basic types. More...
 
const type_decl_diffis_diff_of_basic_type (const diff *diff, bool allow_indirect_type)
 Test if a diff node represents a diff between two basic types, or between pointers, references or qualified type to basic types. More...
 
const class_or_union_diffis_diff_of_class_or_union_type (const diff *d)
 Test if a diff node represents a diff between two class or union types. More...
 
bool is_diff_of_global_decls (const diff *d)
 Tests if a given diff node is to represent the changes between two gobal decls. More...
 
bool is_diff_of_variadic_parameter (const diff *d)
 Test if a diff node represents the difference between a variadic parameter and something else. More...
 
bool is_diff_of_variadic_parameter (const diff_sptr &d)
 Test if a diff node represents the difference between a variadic parameter and something else. More...
 
bool is_diff_of_variadic_parameter_type (const diff *d)
 Test if a diff node represents the difference between a variadic parameter type and something else. More...
 
bool is_diff_of_variadic_parameter_type (const diff_sptr &d)
 Test if a diff node represents the difference between a variadic parameter type and something else. More...
 
const distinct_diffis_distinct_diff (const diff *diff)
 Test if a diff node is about differences between two diff nodes of different kinds. More...
 
const enum_diffis_enum_diff (const diff *diff)
 Test if a diff node is a enum_diff node. More...
 
const fn_parm_diffis_fn_parm_diff (const diff *diff)
 Test if a diff node is about differences between two function parameters. More...
 
const function_decl_diffis_function_decl_diff (const diff *diff)
 Test if a diff node is about differences between functions. More...
 
const function_type_diffis_function_type_diff (const diff *diff)
 Test if a diff node is a function_type_diff node. More...
 
const function_type_diffis_function_type_diff_with_local_changes (const diff *diff)
 Test if a given diff node carries a function type change with local changes. More...
 
const pointer_diffis_pointer_diff (const diff *diff)
 Test if a diff node is about differences between two pointers. More...
 
const qualified_type_diffis_qualified_type_diff (const diff *diff)
 Test if a diff node is about differences between two qualified types. More...
 
const reference_diffis_reference_diff (const diff *diff)
 Test if a diff node is about differences between two references. More...
 
bool is_reference_or_ptr_diff_to_non_basic_nor_distinct_types (const diff *diff)
 Test if a diff node is a reference or pointer diff node to a change that is neither basic type change nor distinct type change. More...
 
const subrange_diffis_subrange_diff (const diff *diff)
 Test if a diff node is a subrange_diff node. More...
 
const type_diff_baseis_type_diff (const diff *diff)
 Test if a diff node is about differences between types. More...
 
const typedef_diffis_typedef_diff (const diff *diff)
 Test if a diff node is a typedef_diff node. More...
 
const union_diffis_union_diff (const diff *diff)
 Test if a diff node is a union_diff node. More...
 
const var_diffis_var_diff (const diff *diff)
 Test if a diff node is about differences between variables. More...
 
uint64_t maybe_convert_bits_to_bytes (uint64_t bits, const diff_context &ctxt)
 Convert a bits value into a byte value if the current diff context instructs us to do so. More...
 
void maybe_report_base_class_reordering (const class_diff &d, ostream &out, const string &indent)
 Report about the base classes of a class having been re-ordered. More...
 
void maybe_report_data_members_replaced_by_anon_dm (const class_or_union_diff &d, ostream &out, const string &indent)
 Report about data members replaced by an anonymous data member without changing the overall bit-layout of the class or union in an ABI-meaningful way. More...
 
bool maybe_report_diff_for_member (const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
 Report the differences in access specifiers and static-ness for class members. More...
 
void maybe_report_diff_for_symbol (const elf_symbol_sptr &symbol1, const elf_symbol_sptr &symbol2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
 Report the difference between two ELF symbols, if there is any. More...
 
bool maybe_report_diff_for_variable (const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
 Report the differences between two generic variables. More...
 
void maybe_report_interfaces_impacted_by_diff (const diff *d, ostream &out, const string &indent)
 If a given diff node impacts some public interfaces, then report about those impacted interfaces on a given output stream. More...
 
void maybe_report_interfaces_impacted_by_diff (const diff_sptr &d, ostream &out, const string &indent)
 If a given diff node impacts some public interfaces, then report about those impacted interfaces on standard output. More...
 
void maybe_report_unreachable_type_changes (const corpus_diff &d, const corpus_diff::diff_stats &s, const string &indent, ostream &out)
 Report changes about types that are not reachable from global functions and variables, in a given. More...
 
void maybe_show_relative_offset_change (const var_diff_sptr &diff, diff_context &ctxt, ostream &out)
 If a given var_diff node carries a data member change in which the offset of the data member actually changed, then emit a string (to an output stream) that represents that offset change. More...
 
void maybe_show_relative_size_change (const var_diff_sptr &diff, diff_context &ctxt, ostream &out)
 If a given var_diff node carries a hange in which the size of the variable actually changed, then emit a string (to an output stream) that represents that size change. More...
 
diff_category operator& (diff_category c1, diff_category c2)
 
visiting_kind operator& (visiting_kind l, visiting_kind r)
 The overloaded and operator for visiting_kind. More...
 
diff_categoryoperator&= (diff_category &c1, diff_category c2)
 
ostream & operator<< (ostream &o, diff_category c)
 Serialize an instance of diff_category to an output stream. More...
 
diff_category operator^ (diff_category c1, diff_category c2)
 
diff_category operator| (diff_category c1, diff_category c2)
 
visiting_kind operator| (visiting_kind l, visiting_kind r)
 The overloaded or operator for visiting_kind. More...
 
diff_categoryoperator|= (diff_category &c1, diff_category c2)
 
diff_category operator~ (diff_category c)
 
visiting_kind operator~ (visiting_kind l)
 The overloaded 'bit inversion' operator for visiting_kind. More...
 
const diffpeel_fn_parm_diff (const diff *dif)
 If a diff node is about changes between two function parameters get the diff node about changes between the types of the parameters. More...
 
const diffpeel_pointer_diff (const diff *dif)
 If a diff node is about changes between two pointer types, get the diff node about changes between the underlying (pointed-to) types. More...
 
const diffpeel_pointer_or_qualified_type_diff (const diff *dif)
 If a diff node is about changes between two pointer, reference or qualified types, get the diff node about changes between the underlying types. More...
 
const diffpeel_qualified_diff (const diff *dif)
 If a diff node is about changes between two qualified types, get the diff node about changes between the underlying (non-qualified) types. More...
 
const diffpeel_reference_diff (const diff *dif)
 If a diff node is about changes between two reference types, get the diff node about changes between the underlying (pointed-to) types. More...
 
const diffpeel_typedef_diff (const diff *dif)
 If a diff node is about changes between two typedef types, get the diff node about changes between the underlying types. More...
 
const diffpeel_typedef_or_qualified_type_diff (const diff *dif)
 If a diff node is about changes between two typedefs or qualified types, get the diff node about changes between the underlying types. More...
 
const diffpeel_typedef_qualified_type_or_parameter_diff (const diff *dif)
 If a diff node is about changes between two typedefs or qualified types, get the diff node about changes between the underlying types. More...
 
void print_diff_tree (corpus_diff *diff_tree, std::ostream &out)
 Emit a textual representation of a corpus_diff tree to an output stream. More...
 
void print_diff_tree (corpus_diff_sptr diff_tree, std::ostream &o)
 Emit a textual representation of a corpus_diff tree to an output stream. More...
 
void print_diff_tree (diff *diff_tree, ostream &out)
 Emit a textual representation of a diff sub-tree to an output stream. More...
 
void print_diff_tree (diff *diff_tree, std::ostream &)
 
void print_diff_tree (diff_sptr diff_tree, std::ostream &o)
 Emit a textual representation of a diff sub-tree to an output stream. More...
 
void propagate_categories (corpus_diff *diff_tree)
 Visit all the nodes of a given corpus tree. For each node that has a particular category set, propagate that category set up to its parent nodes. More...
 
void propagate_categories (corpus_diff_sptr diff_tree)
 Visit all the nodes of a given corpus tree. For each node that has a particular category set, propagate that category set up to its parent nodes. More...
 
void propagate_categories (diff *diff_tree)
 Visit all the nodes of a given sub-tree. For each node that has a particular category set, propagate that category set up to its parent nodes. More...
 
void propagate_categories (diff_sptr diff_tree)
 Visit all the nodes of a given sub-tree. For each node that has a particular category set, propagate that category set up to its parent nodes. More...
 
bool report_loc_info (const type_or_decl_base_sptr &tod, const diff_context &ctxt, ostream &out)
 
void report_mem_header (ostream &out, diff_kind k, const string &section_name, const string &indent)
 Output the header preceding the the report for insertion/deletion/change of a part of a class. This is a subroutine of class_diff::report. More...
 
void report_mem_header (ostream &out, size_t number, size_t num_filtered, diff_kind k, const string &section_name, const string &indent)
 Output the header preceding the the report for insertion/deletion/change of a part of a class. This is a subroutine of class_diff::report. More...
 
void report_name_size_and_alignment_changes (decl_base_sptr first, decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
 Report the name, size and alignment changes of a type. More...
 
void report_size_and_alignment_changes (type_or_decl_base_sptr first, type_or_decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
 Report the size and alignment changes of a type. More...
 
void represent (const diff_context &ctxt, method_decl_sptr mem_fn, ostream &out)
 Stream a string representation for a member function. More...
 
void represent (const subrange_diff &d, const diff_context_sptr ctxt, ostream &out, const string &indent, bool local_only)
 Represent the changes carried by an instance of subrange_diff that represent a difference between two ranges. More...
 
void represent (const var_diff_sptr &diff, diff_context_sptr ctxt, ostream &out, const string &indent, bool local_only)
 Represent the changes carried by an instance of var_diff that represent a difference between two class data members. More...
 
void represent_data_member (var_decl_sptr d, const diff_context_sptr &ctxt, ostream &out, const string &indent)
 Stream a string representation for a data member. More...
 
void show_linkage_name_and_aliases (ostream &out, const string &indent, const elf_symbol &symbol, const string_elf_symbols_map_type &sym_map)
 For a given symbol, emit a string made of its name and version. The string also contains the list of symbols that alias this one. More...
 
void show_numerical_change (const string &what, uint64_t old_bits, uint64_t new_bits, const diff_context &ctxt, ostream &out, bool show_bits_or_byte)
 Emit a message showing the numerical change between two values, to a given output stream. More...
 
void show_offset_or_size (const string &what, uint64_t value, const diff_context &ctxt, ostream &out)
 Emit a message showing the value of a numerical value representing a size or an offset, preceded by a string. The message is ended by a part which says if the value is in bits or bytes. More...
 
void show_offset_or_size (uint64_t value, const diff_context &ctxt, ostream &out)
 Emit a message showing the value of a numerical value representing a size or an offset. The message is ended by a part which says if the value is in bits or bytes. More...
 
void sort_artifacts_set (const artifact_sptr_set_type &set, vector< type_or_decl_base_sptr > &sorted)
 Sort the set of ABI artifacts contained in a artifact_sptr_set_type. More...
 
void sort_changed_data_members (changed_var_sptrs_type &to_sort)
 Sort (in place) a vector of changed data members. More...
 
void sort_changed_enumerators (const string_changed_enumerator_map &enumerators_map, changed_enumerators_type &sorted)
 Sort a map of changed enumerators. More...
 
void sort_data_members (const string_decl_base_sptr_map &data_members, vector< decl_base_sptr > &sorted)
 Sort a map of data members by the offset of their initial value. More...
 
void sort_enumerators (const string_enumerator_map &enumerators_map, enum_type_decl::enumerators &sorted)
 Sort a map of enumerators by their value. More...
 
void sort_string_base_diff_sptr_map (const string_base_diff_sptr_map &map, base_diff_sptrs_type &sorted)
 Sort a map of string -> base_diff_sptr into a sorted vector of base_diff_sptr. The base_diff_sptr are sorted by increasing value of their offset in their containing type. More...
 
void sort_string_base_sptr_map (const string_base_sptr_map &m, class_decl::base_specs &sorted)
 Lexicographically sort base specifications found in instances of string_base_sptr_map. More...
 
void sort_string_data_member_diff_sptr_map (const string_var_diff_sptr_map &map, var_diff_sptrs_type &sorted)
 Sort the values of a string_var_diff_sptr_map and store the result in a vector of var_diff_sptr. More...
 
void sort_string_diff_ptr_map (const string_diff_ptr_map &map, diff_ptrs_type &sorted)
 Sort a map ofg string -> diff* into a vector of diff_ptr. The diff_ptr are sorted lexicographically wrt qualified names of their first subjects. More...
 
void sort_string_diff_sptr_map (const string_diff_sptr_map &map, diff_sptrs_type &sorted)
 Sort a map ofg string -> diff_sptr into a vector of diff_sptr. The diff_sptr are sorted lexicographically wrt qualified names of their first subjects. More...
 
void sort_string_elf_symbol_map (const string_elf_symbol_map &map, vector< elf_symbol_sptr > &sorted)
 Sort a map of string -> pointer to elf_symbol. More...
 
void sort_string_fn_parm_diff_sptr_map (const string_fn_parm_diff_sptr_map &map, vector< fn_parm_diff_sptr > &sorted)
 Sort a map of changed function parameters by the indexes of the function parameters. More...
 
void sort_string_fn_parm_diff_sptr_map (const unsigned_fn_parm_diff_sptr_map &map, vector< fn_parm_diff_sptr > &sorted)
 Sort a map of fn_parm_diff by the indexes of the function parameters. More...
 
void sort_string_function_decl_diff_sptr_map (const string_function_decl_diff_sptr_map &map, function_decl_diff_sptrs_type &sorted)
 Sort the values of a string_function_decl_diff_sptr_map map and store the result in a vector of function_decl_diff_sptr objects. More...
 
void sort_string_function_ptr_map (const string_function_ptr_map &map, vector< function_decl * > &sorted)
 Sort an instance of string_function_ptr_map map and stuff a resulting sorted vector of pointers to function_decl. More...
 
void sort_string_member_function_sptr_map (const string_member_function_sptr_map &map, class_or_union::member_functions &sorted)
 Sort a map that's an instance of string_member_function_sptr_map and fill a vector of member functions with the sorted result. More...
 
void sort_string_parm_map (const string_parm_map &map, vector< function_decl::parameter_sptr > &sorted)
 Sort a map of string -> function parameters. More...
 
void sort_string_type_base_sptr_map (string_type_base_sptr_map &map, vector< type_base_sptr > &sorted)
 Sort a map of string to type_base_sptr entities. More...
 
void sort_string_var_diff_sptr_map (const string_var_diff_sptr_map &map, var_diff_sptrs_type &sorted)
 Sort of an instance of string_var_diff_sptr_map map. More...
 
void sort_string_var_ptr_map (const string_var_ptr_map &map, vector< var_decl * > &sorted)
 Sort a map of string -> pointer to var_decl. More...
 
void sort_string_virtual_member_function_diff_sptr_map (const string_function_decl_diff_sptr_map &map, function_decl_diff_sptrs_type &sorted)
 Sort an map of string -> virtual member function into a vector of virtual member functions. The virtual member functions are sorted by increasing order of their virtual index. More...
 
void sort_unsigned_data_member_diff_sptr_map (const unsigned_var_diff_sptr_map map, var_diff_sptrs_type &sorted)
 Sort the values of a unsigned_var_diff_sptr_map map and store the result into a vector of var_diff_sptr. More...
 
template<typename DiffType >
diff_sptr try_to_diff (const type_or_decl_base_sptr first, const type_or_decl_base_sptr second, diff_context_sptr ctxt)
 </distinct_diff> More...
 
template<>
diff_sptr try_to_diff< class_decl > (const type_or_decl_base_sptr first, const type_or_decl_base_sptr second, diff_context_sptr ctxt)
 This is a specialization of try_to_diff() template to diff instances of class_decl. More...
 

Detailed Description

utilities to compare abi artifacts

The main entry points of the namespace are the compute_diff() overloads used to compute the difference between two abi artifacts.

Typedef Documentation

◆ array_diff_sptr

typedef shared_ptr<array_diff> array_diff_sptr

Convenience typedef for a shared pointer on a array_diff type.

Definition at line 1477 of file abg-comparison.h.

◆ base_diff_sptr

typedef shared_ptr<base_diff> base_diff_sptr

Convenience typedef for a shared pointer to a base_diff type.

Definition at line 108 of file abg-comparison.h.

◆ base_diff_sptrs_type

Convenience typedef for a vector of base_diff_sptr.

Definition at line 111 of file abg-comparison.h.

◆ changed_enumerator

typedef std::pair<enum_type_decl::enumerator, enum_type_decl::enumerator> changed_enumerator

Convenience typedef for a changed enumerator. The first element of the pair is the old enumerator and the second one is the new enumerator.

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

◆ changed_enumerators_type

Convenience typedef for a vector of changed enumerators.

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

◆ changed_member_function_sptr

typedef pair<method_decl_sptr, method_decl_sptr> changed_member_function_sptr

Convenience typedef for a pair of class_decl::member_function_sptr representing a changed member function. The first element of the pair is the initial member function and the second element is the changed one.

Definition at line 220 of file abg-comparison.h.

◆ changed_var_ptr

typedef std::pair<var_decl*, var_decl*> changed_var_ptr

Convenience typedef for a pair of pointer to var_decl representing a var_decl change. The first member of the pair represents the initial variable and the second member represents the changed variable.

Definition at line 238 of file abg-comparison.h.

◆ changed_var_sptr

Convenience typedef for a pair of var_decl_sptr representing a var_decl change. The first member of the pair represents the initial variable and the second member represents the changed variable.

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

◆ changed_var_sptrs_type

Convenience typedef for a vector of @changed_var_sptr.gg381.

Definition at line 247 of file abg-comparison.h.

◆ class_diff_sptr

typedef shared_ptr<class_diff> class_diff_sptr

Convenience typedef for a shared pointer on a class_diff type.

Definition at line 116 of file abg-comparison.h.

◆ corpus_diff_sptr

typedef shared_ptr<corpus_diff> corpus_diff_sptr

A convenience typedef for a shared pointer to corpus_diff.

Definition at line 608 of file abg-comparison.h.

◆ decl_diff_base_sptr

typedef shared_ptr<decl_diff_base> decl_diff_base_sptr

Convenience typedef for a shared_ptr of decl_diff_base.

Definition at line 71 of file abg-comparison.h.

◆ decl_diff_base_sptrs_type

Convenience typedef for a vector of decl_diff_base_sptr.

Definition at line 74 of file abg-comparison.h.

◆ default_reporter_sptr

A convenience typedef for a shared_ptr to a default_reporter.

Definition at line 150 of file abg-reporter.h.

◆ diff_artifact_set_map_type

A convenience typedef for an unordered_map which key is a diff* and which value is a artifact_sptr_set_type.

Definition at line 166 of file abg-comparison-priv.h.

◆ diff_context_sptr

typedef shared_ptr<diff_context> diff_context_sptr

Convenience typedef for a shared pointer of diff_context.

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

◆ diff_context_wptr

typedef weak_ptr<diff_context> diff_context_wptr

Convenience typedef for a weak pointer of diff_context.

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

◆ diff_ptrs_type

typedef vector<diff*> diff_ptrs_type

Convenience typedef for a vector of diff*.

Definition at line 63 of file abg-comparison.h.

◆ diff_sptr

typedef shared_ptr<diff> diff_sptr

Convenience typedef for a shared_ptr for the diff class.

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

◆ diff_sptrs_type

typedef vector<diff_sptr> diff_sptrs_type

Convenience typedef for a vector of diff_sptr.

Definition at line 60 of file abg-comparison.h.

◆ diff_traversable_base_sptr

Convenience typedef for shared_ptr on diff_traversable_base.

Definition at line 262 of file abg-comparison.h.

◆ diff_wptr

typedef weak_ptr<diff> diff_wptr

Convenience typedef for a weak_ptr for the diff class.

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

◆ distinct_diff_sptr

typedef shared_ptr<distinct_diff> distinct_diff_sptr

Convenience typedef for a shared pointer to distinct_types_diff.

Definition at line 1204 of file abg-comparison.h.

◆ fn_parm_diff_sptr

typedef shared_ptr<fn_parm_diff> fn_parm_diff_sptr

Convenience typedef for a shared pointer to a fn_parm_diff type.

Definition at line 95 of file abg-comparison.h.

◆ function_decl_diff_sptr

Convenience typedef for a shared pointer to a function_decl type.

Definition at line 86 of file abg-comparison.h.

◆ function_decl_diff_sptrs_type

Convenience typedef for a vector of function_decl_diff_sptr.

Definition at line 89 of file abg-comparison.h.

◆ function_type_diff_sptr

A convenience typedef for a shared pointer to function_type_type_diff.

Definition at line 2120 of file abg-comparison.h.

◆ pointer_diff_sptr

typedef shared_ptr<pointer_diff> pointer_diff_sptr

Convenience typedef for a shared pointer on a pointer_diff type.

Definition at line 1308 of file abg-comparison.h.

◆ pointer_map

typedef unordered_map<size_t, size_t> pointer_map

Convenience typedef for a map of pointer values. The Key is a pointer value and the value is potentially another pointer value associated to the first one.

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

◆ reference_diff_sptr

typedef shared_ptr<reference_diff> reference_diff_sptr

Convenience typedef for a shared pointer on a reference_diff type.

Definition at line 1365 of file abg-comparison.h.

◆ reporter_base_sptr

typedef shared_ptr<reporter_base> reporter_base_sptr

A convenience typedef for a shared pointer to a reporter_base.

Definition at line 53 of file abg-reporter.h.

◆ scope_diff_sptr

typedef shared_ptr<scope_diff> scope_diff_sptr

Convenience typedef for a shared pointer on a scope_diff.

Definition at line 1963 of file abg-comparison.h.

◆ string_base_diff_sptr_map

typedef unordered_map<string, base_diff_sptr> string_base_diff_sptr_map

Convenience typedef for a map of string and base_diff_sptr.

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

◆ string_base_sptr_map

typedef unordered_map<string, class_decl::base_spec_sptr> string_base_sptr_map

Convenience typedef for a map of string and class_decl::basse_spec_sptr.

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

◆ string_changed_enumerator_map

typedef unordered_map<string, changed_enumerator> string_changed_enumerator_map

Convenience typedef for a map which value is a changed enumerator. The key is the name of the changed enumerator.

Definition at line 203 of file abg-comparison.h.

◆ string_changed_member_function_sptr_map

Convenience typedef for a hash map of strings and changed member functions.

Definition at line 225 of file abg-comparison.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 125 of file abg-comparison.h.

◆ string_decl_diff_base_sptr_map

typedef unordered_map<string, decl_diff_base_sptr> string_decl_diff_base_sptr_map

Convenience typedef for a map which value is a decl_diff_base_sptr. The key of the map is the qualified name of the changed type.

Definition at line 165 of file abg-comparison.h.

◆ string_diff_ptr_map

typedef unordered_map<string, diff*> string_diff_ptr_map

Convenience typedef for a map which value is a diff*. The key of the map is the qualified name of the changed type.

Definition at line 173 of file abg-comparison.h.

◆ string_diff_sptr_map

typedef unordered_map<string, diff_sptr> string_diff_sptr_map

Convenience typedef for a map which value is a diff_sptr. The key of the map is the qualified name of the changed type.

Definition at line 169 of file abg-comparison.h.

◆ string_elf_symbol_map

typedef unordered_map<string, elf_symbol_sptr> string_elf_symbol_map

Convenience typedef for a map whose key is a string and whose value is an elf_symbol_sptr.

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

◆ string_enumerator_map

typedef unordered_map<string, enum_type_decl::enumerator> string_enumerator_map

Convenience typedef for a map which value is an enumerator. The key is the name of the enumerator.

Definition at line 191 of file abg-comparison.h.

◆ string_fn_parm_diff_sptr_map

typedef unordered_map<string, fn_parm_diff_sptr> string_fn_parm_diff_sptr_map

Convenience typedef for a map which value is a changed function parameter and which key is the name of the function parameter.

Definition at line 143 of file abg-comparison.h.

◆ string_function_decl_diff_sptr_map

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

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

◆ string_function_ptr_map

typedef unordered_map<string, function_decl*> string_function_ptr_map

Convenience typedef for a map which key is a string and which value is a pointer to decl_base.

Definition at line 207 of file abg-comparison.h.

◆ string_member_function_sptr_map

typedef unordered_map<string, method_decl_sptr> string_member_function_sptr_map

Convenience typedef for a hash map of strings and member functions.

Definition at line 228 of file abg-comparison.h.

◆ string_parm_map

typedef unordered_map<string, function_decl::parameter_sptr> string_parm_map

Convenience typedef for a map which value is a function parameter. The key is the name of the function parm.

Definition at line 187 of file abg-comparison.h.

◆ string_type_base_sptr_map

typedef unordered_map<string, type_base_sptr> string_type_base_sptr_map

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

Definition at line 129 of file abg-comparison.h.

◆ string_type_diff_base_sptr_map

typedef unordered_map<string, type_diff_base_sptr> string_type_diff_base_sptr_map

Convenience typedef for a map which value is a type_diff_base_sptr. The key of the map is the qualified name of the changed type.

Definition at line 159 of file abg-comparison.h.

◆ string_var_diff_ptr_map

typedef unordered_map<string, var_diff_sptr> string_var_diff_ptr_map

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

Definition at line 255 of file abg-comparison.h.

◆ string_var_diff_sptr_map

typedef unordered_map<string, var_diff_sptr> string_var_diff_sptr_map

Convenience typedef for a map whose key is a string and whose value is a changed variable of type var_diff_sptr.

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

◆ string_var_ptr_map

typedef unordered_map<string, var_decl*> string_var_ptr_map

Convenience typedef for a map which key is a string and which value is a point to var_decl.

Definition at line 232 of file abg-comparison.h.

◆ subrange_diff_sptr

typedef shared_ptr<subrange_diff> subrange_diff_sptr

A convenience typedef for a shared pointer to subrange_diff type.

Definition at line 1422 of file abg-comparison.h.

◆ translation_unit_diff_sptr

Convenience typedef for a shared pointer on a translation_unit_diff type.

Definition at line 2358 of file abg-comparison.h.

◆ type_decl_diff_sptr

typedef shared_ptr<type_decl_diff> type_decl_diff_sptr

Convenience typedef for a shared pointer on a type_decl_diff type.

Definition at line 2251 of file abg-comparison.h.

◆ type_diff_base_sptr

typedef shared_ptr<type_diff_base> type_diff_base_sptr

Convenience pointer for a shared pointer to a type_diff_base.

Definition at line 78 of file abg-comparison.h.

◆ type_diff_base_sptrs_type

Convenience typedef for a vector of type_diff_base_sptr.

Definition at line 81 of file abg-comparison.h.

◆ typedef_diff_sptr

typedef shared_ptr<typedef_diff> typedef_diff_sptr

Convenience typedef for a shared pointer on a typedef_diff type.

Definition at line 2296 of file abg-comparison.h.

◆ types_or_decls_diff_map_type

A convenience typedef for a map of types_or_decls_type and diff_sptr.

Definition at line 78 of file abg-comparison-priv.h.

◆ types_or_decls_type

Convenience typedef for a pair of decls or types.

Definition at line 52 of file abg-comparison-priv.h.

◆ unordered_diff_sptr_set

Convenience typedef for an unoredered set of diff_sptr.

Definition at line 66 of file abg-comparison.h.

◆ unsigned_decl_base_sptr_map

typedef unordered_map<unsigned, decl_base_sptr> unsigned_decl_base_sptr_map

Convenience typedef for a map which key is an unsigned integer and which value is a decl_base_sptr.

Definition at line 133 of file abg-comparison.h.

◆ unsigned_fn_parm_diff_sptr_map

typedef unordered_map<unsigned, fn_parm_diff_sptr> unsigned_fn_parm_diff_sptr_map

Convenience typedef for a map which key is an integer and which value is a changed parameter.

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

◆ unsigned_parm_map

typedef unordered_map<unsigned, function_decl::parameter_sptr> unsigned_parm_map

Convenience typedef for a map which key is an integer and which value is a parameter.

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

◆ unsigned_var_diff_sptr_map

typedef unordered_map<unsigned, var_diff_sptr> unsigned_var_diff_sptr_map

Convenience typedef for a map whose key is an unsigned int and whose value is a changed variable of type var_diff_sptr.

Definition at line 183 of file abg-comparison.h.

◆ var_diff_sptr

typedef shared_ptr<var_diff> var_diff_sptr

Convenience typedef for a shared pointer to a var_diff type.

Definition at line 100 of file abg-comparison.h.

◆ var_diff_sptrs_type

Convenience typedef for a vector of var_diff_sptr.

Definition at line 103 of file abg-comparison.h.

Enumeration Type Documentation

◆ diff_category

An enum for the different categories that a diff tree node falls into, regarding the kind of changes it represents.

Note that if you add an enumerator to this enum, you need to update a few spots accordingly:

* update the ACCESS_CHANGE_CATEGORY enumerator (which is the last enumerator of this enum by OR-ing its initializer with the new enumerator.

* update the categorize_harmless_diff_node or categorize_harmful_diff_node function depending on if the new enumerator classifies diff nodes as harmless or harmful.

* update the get_default_harmless_categories_bitmap or get_default_harmful_categories_bitmap function as well, just like above.

* update the "operator<<(ostream& o, diff_category c)" streaming operator so that it can stream the new enumerator to a textual output stream.

Enumerator
NO_CHANGE_CATEGORY 

This means the diff node does not carry any (meaningful) change, or that it carries changes that have not yet been categorized.

ACCESS_CHANGE_CATEGORY 

This means the diff node (or at least one of its descendant nodes) carries access related changes, e.g, a private member that becomes public.

COMPATIBLE_TYPE_CHANGE_CATEGORY 

This means the diff node (or at least one of its descendant nodes) carries a change involving two compatible types. For instance a type and its typedefs.

HARMLESS_DECL_NAME_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries a harmless declaration name change. This is set only for name changes for data members and typedefs.

NON_VIRT_MEM_FUN_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries an addition or removal of a non-virtual member function.

STATIC_DATA_MEMBER_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries an addition or removal of a static data member.

HARMLESS_ENUM_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries an addition of enumerator to an enum type.

HARMLESS_SYMBOL_ALIAS_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries an a symbol alias change that is harmless.

HARMLESS_UNION_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries a harmless union change.

HARMLESS_DATA_MEMBER_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries a harmless data member change. An example of harmless data member change is an anonymous data member that replaces a given data member without locally changing the layout.

SUPPRESSED_CATEGORY 

This means that a diff node was marked as suppressed by a user-provided suppression specification.

PRIVATE_TYPE_CATEGORY 

This means that a diff node was warked as being for a private type. That is, the diff node is meant to be suppressed by a suppression specification that was auto-generated to filter out changes to private types.

SIZE_OR_OFFSET_CHANGE_CATEGORY 

This means the diff node (or at least one of its descendant nodes) carries a change that modifies the size of a type or an offset of a type member. Removal or changes of enumerators in a enum fall in this category too.

VIRTUAL_MEMBER_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries an incompatible change to a vtable.

REDUNDANT_CATEGORY 

A diff node in this category is redundant. That means it's present as a child of a other nodes in the diff tree.

TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY 

This means that a diff node in the sub-tree carries a type that was declaration-only and that is now defined, or vice versa.

FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY 

A diff node in this category is a function parameter type which top cv-qualifiers change.

FN_PARM_TYPE_CV_CHANGE_CATEGORY 

A diff node in this category has a function parameter type with a cv-qualifiers change.

FN_RETURN_TYPE_CV_CHANGE_CATEGORY 

A diff node in this category is a function return type with a cv-qualifier change.

FN_PARM_ADD_REMOVE_CHANGE_CATEGORY 

A diff node in this category is a function (or function type) with at least one parameter added or removed.

VAR_TYPE_CV_CHANGE_CATEGORY 

A diff node in this category is for a variable which type holds a cv-qualifier change.

VOID_PTR_TO_PTR_CHANGE_CATEGORY 

A diff node in this category carries a change from void pointer to non-void pointer.

BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY 

A diff node in this category carries a change in the size of the array type of a global variable, but the ELF size of the variable didn't change.

HAS_ALLOWED_CHANGE_CATEGORY 

A diff node in this category carries a change that must be reported, even if the diff node is also in the SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories. Typically, this node matches a suppression specification like the [allow_type] directive.

HAS_DESCENDANT_WITH_ALLOWED_CHANGE_CATEGORY 

A diff node in this category has a descendant node that is in the HAS_ALLOWED_CHANGE_CATEGORY category. Nodes in this category must be reported, even if they are also in the SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories.

HAS_PARENT_WITH_ALLOWED_CHANGE_CATEGORY 

A diff node in this category has a parent node that is in the HAS_ALLOWED_CHANGE_CATEGORY category. Nodes in this category must be reported, even if they are also in the SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories.

EVERYTHING_CATEGORY 

A special enumerator that is the logical 'or' all the enumerators above.

This one must stay the last enumerator. Please update it each time you add a new enumerator above.

Definition at line 322 of file abg-comparison.h.

◆ diff_kind

enum diff_kind

Represent the kind of difference we want report_mem_header() to report.

Definition at line 187 of file abg-reporter-priv.h.

◆ visiting_kind

An enum for the different ways to visit a diff tree node.

This is used by the node traversing code, to know when to avoid visiting children nodes, for instance.

Enumerator
DEFAULT_VISITING_KIND 

The default enumerator value of this enum. It doesn't have any particular meaning yet.

SKIP_CHILDREN_VISITING_KIND 

This says that the traversing code should avoid visiting the children nodes of the current node being visited.

DO_NOT_MARK_VISITED_NODES_AS_VISITED 

This says that the traversing code should not mark visited nodes as having been traversed. This is useful, for instance, for visitors which have debugging purposes.

Definition at line 268 of file abg-comparison.h.

Function Documentation

◆ apply_filters()

void apply_filters ( corpus_diff_sptr  diff_tree)

Apply the diff tree filters that have been associated to the context of the a given corpus_diff tree. As a result, the nodes of the @diff tree are going to be categorized into one of several of the categories of diff_category.

Parameters
diff_treethe corpus_diff instance which diff are to be categorized.

Definition at line 13129 of file abg-comparison.cc.

◆ apply_suppressions() [1/4]

void apply_suppressions ( const corpus_diff diff_tree)

Walk a corpus_diff tree and appply the suppressions carried by the context. If the suppression applies to a given node then categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization.

Parameters
diff_treethe diff tree to apply the suppressions to.

Definition at line 12555 of file abg-comparison.cc.

◆ apply_suppressions() [2/4]

void apply_suppressions ( corpus_diff_sptr  diff_tree)

Walk a diff tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization.

Parameters
diff_treethe diff tree to apply the suppressions to.

Definition at line 12584 of file abg-comparison.cc.

◆ apply_suppressions() [3/4]

void apply_suppressions ( diff diff_tree)

Walk a given diff-sub tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization.

Parameters
diff_treethe diff-sub tree to apply the suppressions to.

Definition at line 12523 of file abg-comparison.cc.

◆ apply_suppressions() [4/4]

void apply_suppressions ( diff_sptr  diff_tree)

Walk a given diff-sub tree and appply the suppressions carried by the context. If the suppression applies to a given node than categorize the node into the SUPPRESSED_CATEGORY category and propagate that categorization.

Parameters
diff_treethe diff-sub tree to apply the suppressions to.

Definition at line 12545 of file abg-comparison.cc.

◆ categorize_redundancy() [1/4]

void categorize_redundancy ( corpus_diff diff_tree)

Walk a given corpus_diff tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY.

Parameters
diff_treethe corpus_diff tree to walk.

Definition at line 13055 of file abg-comparison.cc.

◆ categorize_redundancy() [2/4]

void categorize_redundancy ( corpus_diff_sptr  diff_tree)

Walk a given corpus_diff tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY.

Parameters
diff_treethe corpus_diff tree to walk.

Definition at line 13070 of file abg-comparison.cc.

◆ categorize_redundancy() [3/4]

void categorize_redundancy ( diff diff_tree)

Walk a given diff sub-tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY.

Parameters
diff_treethe diff sub-tree to walk.

Definition at line 13031 of file abg-comparison.cc.

◆ categorize_redundancy() [4/4]

void categorize_redundancy ( diff_sptr  diff_tree)

Walk a given diff sub-tree to categorize each of the nodes with respect to the REDUNDANT_CATEGORY.

Parameters
diff_treethe diff sub-tree to walk.

Definition at line 13047 of file abg-comparison.cc.

◆ clear_redundancy_categorization() [1/4]

void clear_redundancy_categorization ( corpus_diff diff_tree)

Walk a given corpus_diff tree to clear the REDUNDANT_CATEGORY out of the category of the nodes.

Parameters
diff_treethe corpus_diff tree to walk.

Definition at line 13103 of file abg-comparison.cc.

◆ clear_redundancy_categorization() [2/4]

void clear_redundancy_categorization ( corpus_diff_sptr  diff_tree)

Walk a given corpus_diff tree to clear the REDUNDANT_CATEGORY out of the category of the nodes.

Parameters
diff_treethe corpus_diff tree to walk.

Definition at line 13118 of file abg-comparison.cc.

◆ clear_redundancy_categorization() [3/4]

void clear_redundancy_categorization ( diff diff_tree)

Walk a given diff sub-tree to clear the REDUNDANT_CATEGORY out of the category of the nodes.

Parameters
diff_treethe diff sub-tree to walk.

Definition at line 13080 of file abg-comparison.cc.

◆ clear_redundancy_categorization() [4/4]

void clear_redundancy_categorization ( diff_sptr  diff_tree)

Walk a given diff sub-tree to clear the REDUNDANT_CATEGORY out of the category of the nodes.

Parameters
diff_treethe diff sub-tree to walk.

Definition at line 13095 of file abg-comparison.cc.

◆ compute_diff() [1/22]

Compute the diff between two instances of subrange_diff.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first subrange_diff to consider for the diff.
secondthe second subrange_diff to consider for the diff.
ctxtthe diff context to use.
Returns
the resulting diff between the two subrange_diff.

Definition at line 3847 of file abg-comparison.cc.

◆ compute_diff() [2/22]

array_diff_sptr compute_diff ( array_type_def_sptr  first,
array_type_def_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two arrays.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first array to consider for the diff.
secondthe second array to consider for the diff.
ctxtthe diff context to use.

Definition at line 4001 of file abg-comparison.cc.

◆ compute_diff() [3/22]

base_diff_sptr compute_diff ( const class_decl::base_spec_sptr  first,
const class_decl::base_spec_sptr  second,
diff_context_sptr  ctxt 
)

Constructs the diff object representing a diff between two base class specifications.

Note that the two artifacts must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first base class specification.
secondthe second base class specification.
ctxtthe content of the diff.
Returns
the resulting diff object.

Definition at line 6300 of file abg-comparison.cc.

◆ compute_diff() [4/22]

class_diff_sptr compute_diff ( const class_decl_sptr  first,
const class_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute the set of changes between two instances of class_decl.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first class_decl to consider.
secondthe second class_decl to consider.
Returns
changes the resulting changes.
Parameters
ctxtthe diff context to use.

Definition at line 6078 of file abg-comparison.cc.

◆ compute_diff() [5/22]

corpus_diff_sptr compute_diff ( const corpus_group_sptr &  f,
const corpus_group_sptr &  s,
diff_context_sptr  ctxt 
)

Compute the diff between two instances of corpus_group.

Note that the two corpus_diff must have been created in the same environment, otherwise, this function aborts.

Parameters
fthe first corpus_group to consider for the diff.
sthe second corpus_group to consider for the diff.
ctxtthe diff context to use.
Returns
the resulting diff between the two corpus_group.

Definition at line 11823 of file abg-comparison.cc.

◆ compute_diff() [6/22]

corpus_diff_sptr compute_diff ( const corpus_sptr  f,
const corpus_sptr  s,
diff_context_sptr  ctxt 
)

Compute the diff between two instances of corpus.

Note that the two corpora must have been created in the same environment, otherwise, this function aborts.

Parameters
fthe first corpus to consider for the diff.
sthe second corpus to consider for the diff.
ctxtthe diff context to use.
Returns
the resulting diff between the two corpus.

Definition at line 11735 of file abg-comparison.cc.

◆ compute_diff() [7/22]

diff_sptr compute_diff ( const decl_base_sptr  first,
const decl_base_sptr  second,
diff_context_sptr  ctxt 
)

Compute the difference between two decls. The decls can represent either type declarations, or non-type declaration.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first decl to consider.
secondthe second decl to consider.
ctxtthe diff context to use.
Returns
the resulting diff, or NULL if the diff could not be computed.

Definition at line 3398 of file abg-comparison.cc.

◆ compute_diff() [8/22]

enum_diff_sptr compute_diff ( const enum_type_decl_sptr  first,
const enum_type_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute the set of changes between two instances of enum_type_decl.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firsta pointer to the first enum_type_decl to consider.
seconda pointer to the second enum_type_decl to consider.
Returns
the resulting diff of the two enums first and second.
Parameters
ctxtthe diff context to use.

Definition at line 4495 of file abg-comparison.cc.

◆ compute_diff() [9/22]

fn_parm_diff_sptr compute_diff ( const function_decl::parameter_sptr  first,
const function_decl::parameter_sptr  second,
diff_context_sptr  ctxt 
)

Compute the difference between two function_decl::parameter_sptr; that is, between two function parameters. Return a resulting fn_parm_diff_sptr that represents the changes.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first subject of the diff.
secondthe second subject of the diff.
ctxtthe context of the diff.
Returns
fn_parm_diff_sptr the resulting diff node.

Definition at line 7102 of file abg-comparison.cc.

◆ compute_diff() [10/22]

function_decl_diff_sptr compute_diff ( const function_decl_sptr  first,
const function_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two function_decl.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first function_decl to consider for the diff
secondthe second function_decl to consider for the diff
ctxtthe diff context to use.
Returns
the computed diff

Definition at line 7535 of file abg-comparison.cc.

◆ compute_diff() [11/22]

function_type_diff_sptr compute_diff ( const function_type_sptr  first,
const function_type_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two instances of function_type.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first function_type to consider for the diff.
secondthe second function_type to consider for the diff.
ctxtthe diff context to use.
Returns
the resulting diff between the two function_type.

Definition at line 7395 of file abg-comparison.cc.

◆ compute_diff() [12/22]

qualified_type_diff_sptr compute_diff ( const qualified_type_def_sptr  first,
const qualified_type_def_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two qualified types.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first qualified type to consider for the diff.
secondthe second qualified type to consider for the diff.
ctxtthe diff context to use.

Definition at line 4280 of file abg-comparison.cc.

◆ compute_diff() [13/22]

scope_diff_sptr compute_diff ( const scope_decl_sptr  first,
const scope_decl_sptr  second,
scope_diff_sptr  d,
diff_context_sptr  ctxt 
)

Compute the diff between two scopes.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first scope to consider in computing the diff.
secondthe second scope to consider in the diff computation. The second scope is diffed against the first scope.
da pointer to the diff object to populate with the computed diff.
Returns
return the populated d parameter passed to this function.
Parameters
ctxtthe diff context to use.

Definition at line 6926 of file abg-comparison.cc.

◆ compute_diff() [14/22]

scope_diff_sptr compute_diff ( const scope_decl_sptr  first_scope,
const scope_decl_sptr  second_scope,
diff_context_sptr  ctxt 
)

Compute the diff between two scopes.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
first_scopethe first scope to consider in computing the diff.
second_scopethe second scope to consider in the diff computation. The second scope is diffed against the first scope.
ctxtthe diff context to use.
Returns
return the resulting diff

Definition at line 6959 of file abg-comparison.cc.

◆ compute_diff() [15/22]

translation_unit_diff_sptr compute_diff ( const translation_unit_sptr  first,
const translation_unit_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two translation_units.

Note that the two translation units must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first translation_unit to consider.
secondthe second translation_unit to consider.
ctxtthe diff context to use. If null, this function will create a new context and set to the diff object returned.
Returns
the newly created diff object.

Definition at line 7929 of file abg-comparison.cc.

◆ compute_diff() [16/22]

diff_sptr compute_diff ( const type_base_sptr  first,
const type_base_sptr  second,
diff_context_sptr  ctxt 
)

Compute the difference between two types.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first type to consider.
secondthe second type to consider.
ctxtthe diff context to use.
Returns
the resulting diff, or NULL if the diff couldn't be computed.

Definition at line 3428 of file abg-comparison.cc.

◆ compute_diff() [17/22]

type_decl_diff_sptr compute_diff ( const type_decl_sptr  first,
const type_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute a diff between two type_decl.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

This function doesn't actually compute a diff. As a type_decl is very simple (unlike compound constructs like function_decl or class_decl) it's easy to just compare the components of the type_decl to know what has changed. Thus this function just builds and return a type_decl_diff object. The type_decl_diff::report function will just compare the components of the the two type_decl and display where and how they differ.

Parameters
firsta pointer to the first type_decl to consider.
seconda pointer to the second type_decl to consider.
ctxtthe diff context to use.
Returns
a pointer to the resulting type_decl_diff.

Definition at line 7663 of file abg-comparison.cc.

◆ compute_diff() [18/22]

typedef_diff_sptr compute_diff ( const typedef_decl_sptr  first,
const typedef_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute a diff between two typedef_decl.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firsta pointer to the first typedef_decl to consider.
seconda pointer to the second typedef_decl to consider.
ctxtthe diff context to use.
Returns
a pointer to the the resulting typedef_diff.

Definition at line 7813 of file abg-comparison.cc.

◆ compute_diff() [19/22]

union_diff_sptr compute_diff ( const union_decl_sptr  first,
const union_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute the difference between two union_decl types.

Note that the two types must hav been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first union_decl to consider.
secondthe second union_decl to consider.
ctxtthe context of the diff to use.

Definition at line 6415 of file abg-comparison.cc.

◆ compute_diff() [20/22]

var_diff_sptr compute_diff ( const var_decl_sptr  first,
const var_decl_sptr  second,
diff_context_sptr  ctxt 
)

Compute the diff between two instances of var_decl.

Note that the two decls must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first var_decl to consider for the diff.
secondthe second var_decl to consider for the diff.
ctxtthe diff context to use.
Returns
the resulting diff between the two var_decl.

Definition at line 3580 of file abg-comparison.cc.

◆ compute_diff() [21/22]

Compute the diff between between two pointers.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe pointer to consider for the diff.
secondthe pointer to consider for the diff.
Returns
the resulting diff between the two pointers.
Parameters
ctxtthe diff context to use.

Definition at line 3711 of file abg-comparison.cc.

◆ compute_diff() [22/22]

Compute the diff between two references.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first reference to consider for the diff.
secondthe second reference to consider for the diff.
ctxtthe diff context to use.

Definition at line 4133 of file abg-comparison.cc.

◆ compute_diff_for_distinct_kinds()

distinct_diff_sptr compute_diff_for_distinct_kinds ( const type_or_decl_base_sptr  first,
const type_or_decl_base_sptr  second,
diff_context_sptr  ctxt 
)

Try to diff entities that are of distinct kinds.

Parameters
firstthe first entity to consider for the diff.
secondthe second entity to consider for the diff.
ctxtthe context of the diff.
Returns
a non-null diff if a diff object could be built, null otherwise.

Definition at line 2900 of file abg-comparison.cc.

◆ convert_bits_to_bytes()

uint64_t convert_bits_to_bytes ( size_t  bits)

Convert a number in bits into a number in bytes.

Parameters
bitsthe number in bits to convert.
Returns
the number bits converted into bytes.

Definition at line 25 of file abg-reporter-priv.cc.

◆ emit_num_value()

void emit_num_value ( uint64_t  value,
const diff_context ctxt,
ostream &  out 
)

Emit a numerical value to an output stream.

Depending on the current diff_context, the number is going to be emitted either in decimal or hexadecimal base.

Parameters
valuethe value to emit.
ctxtthe current diff context.
outthe output stream to emit the numerical value to.

Definition at line 39 of file abg-reporter-priv.cc.

◆ get_default_harmful_categories_bitmap()

diff_category get_default_harmful_categories_bitmap ( )

Getter of a bitmap made of the set of change categories that are considered harmful.

Returns
the bitmap made of the set of change categories that are considered harmful.

Definition at line 3122 of file abg-comparison.cc.

◆ get_default_harmless_categories_bitmap()

diff_category get_default_harmless_categories_bitmap ( )

Getter of a bitmap made of the set of change categories that are considered harmless.

Returns
the bitmap made of the set of change categories that are considered harmless.

Definition at line 3096 of file abg-comparison.cc.

◆ get_leaf_type()

type_base_sptr get_leaf_type ( qualified_type_def_sptr  t)

Return the first underlying type that is not a qualified type.

Parameters
tthe qualified type to consider.
Returns
the first underlying type that is not a qualified type, or NULL if t is NULL.

Definition at line 545 of file abg-comparison.cc.

◆ get_pretty_representation()

string get_pretty_representation ( diff d)

Get a copy of the pretty representation of a diff node.

Parameters
dthe diff node to consider.
Returns
the pretty representation string.

Definition at line 3446 of file abg-comparison.cc.

◆ get_typedef_diff_underlying_type_diff()

const diff * get_typedef_diff_underlying_type_diff ( const diff diff)

Return the leaf underlying diff node of a typedef_diff node.

If the underlying diff node of a typedef_diff node is itself a typedef_diff node, then recursively look at the underlying diff nodes to get the first one that is not a a typedef_diff node. This is what a leaf underlying diff node means.

Otherwise, if the underlying diff node of typedef_diff is *NOT* a typedef_diff node, then just return the underlying diff node.

And if the diff node considered is not a typedef_diff node, then just return it.

Returns
the leaf underlying diff node of a diff.

Definition at line 7843 of file abg-comparison.cc.

◆ has_basic_type_change_only()

bool has_basic_type_change_only ( const diff d)

Test if a diff node is a decl diff that only carries a basic type change on its type diff sub-node.

Note that that pointers/references/qualified types diffs to basic type diffs are considered as having basic type change only.

Parameters
dthe diff node to consider.
Returns
true iff d is a decl diff that only carries a basic type change on its type diff sub-node.

Definition at line 13440 of file abg-comparison.cc.

◆ is_anonymous_class_or_union_diff()

const class_or_union_diff * is_anonymous_class_or_union_diff ( const diff d)

Test if a diff node is a class_or_union_diff between two anonymous classes or unions.

Parameters
dthe diff node to consider.
Returns
a non-nil pointer to the class_or_union_diff iff denoted by d iff is pointer to an anonymous class or union diff.

Definition at line 680 of file abg-comparison.cc.

◆ is_array_diff()

const array_diff * is_array_diff ( const diff diff)

Test if a diff node is a array_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a array_diff iff diff is a array_diff node.

Definition at line 715 of file abg-comparison.cc.

◆ is_base_diff()

const base_diff * is_base_diff ( const diff diff)

Test if a diff node is about differences between two base class specifiers.

Parameters
diffthe diff node to consider.
Returns
the diff converted into an instance of base_diff iff diff is about differences between two base class specifiers.

Definition at line 862 of file abg-comparison.cc.

◆ is_child_node_of_base_diff()

bool is_child_node_of_base_diff ( const diff diff)

Test if a diff node is a child node of a base diff node.

Parameters
diffthe diff node to test.
Returns
true iff diff is a child node of a base diff node.

Definition at line 903 of file abg-comparison.cc.

◆ is_child_node_of_function_parm_diff()

bool is_child_node_of_function_parm_diff ( const diff diff)

Test if a diff node is a child node of a function parameter diff node.

Parameters
diffthe diff node to test.
Returns
true iff diff is a child node of a function parameter diff node.

Definition at line 894 of file abg-comparison.cc.

◆ is_class_diff()

const class_diff * is_class_diff ( const diff diff)

Test if a diff node is a class_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a class_diff iff diff is a class_diff node.

Definition at line 638 of file abg-comparison.cc.

◆ is_class_or_union_diff()

const class_or_union_diff * is_class_or_union_diff ( const diff d)

Test if a diff node is a class_or_union_diff node.

Parameters
dthe diff node to consider.
Returns
a non-nil pointer to the class_or_union_diff denoted by d iff d is a class_or_union_diff.

Definition at line 668 of file abg-comparison.cc.

◆ is_corpus_diff()

const corpus_diff * is_corpus_diff ( const diff diff)

Test if a diff node is a corpus_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a corpus_diff iff diff is a corpus_diff node.

Definition at line 884 of file abg-comparison.cc.

◆ is_decl_diff()

const decl_diff_base * is_decl_diff ( const diff diff)

Test if a diff node is about differences between declarations.

Parameters
diffthe diff node to test.
Returns
a pointer to the actual decl_diff_base diff extends, iff it is about differences between declarations.

Definition at line 628 of file abg-comparison.cc.

◆ is_diff_of_basic_type() [1/2]

const type_decl_diff * is_diff_of_basic_type ( const diff d)

Test if a diff node represents a diff between two basic types.

Parameters
dthe diff node to consider.
Returns
true iff d is a diff between two basic types.

Definition at line 13202 of file abg-comparison.cc.

◆ is_diff_of_basic_type() [2/2]

const type_decl_diff * is_diff_of_basic_type ( const diff diff,
bool  allow_indirect_type 
)

Test if a diff node represents a diff between two basic types, or between pointers, references or qualified type to basic types.

Parameters
diffthe diff node to consider.
allow_indirect_typeif true, then this function looks into pointer, reference or qualified diff types to see if they "point to" basic types.
Returns
true iff d is a diff between two basic types.

Definition at line 13216 of file abg-comparison.cc.

◆ is_diff_of_class_or_union_type()

const class_or_union_diff * is_diff_of_class_or_union_type ( const diff d)

Test if a diff node represents a diff between two class or union types.

Parameters
dthe diff node to consider.
Returns
iff is a diff between two class or union types then return the instance of class_or_union_diff that derives from. Otherwise, return nil.

Definition at line 13409 of file abg-comparison.cc.

◆ is_diff_of_global_decls()

bool is_diff_of_global_decls ( const diff d)

Tests if a given diff node is to represent the changes between two gobal decls.

Parameters
dthe diff node to consider.
Returns
true iff d represents the changes between two global decls.

Definition at line 566 of file abg-comparison.cc.

◆ is_diff_of_variadic_parameter() [1/2]

bool is_diff_of_variadic_parameter ( const diff d)

Test if a diff node represents the difference between a variadic parameter and something else.

Parameters
dthe diff node to consider.
Returns
true iff d is a diff node that represents the difference between a variadic parameter and something else.

Definition at line 13178 of file abg-comparison.cc.

◆ is_diff_of_variadic_parameter() [2/2]

bool is_diff_of_variadic_parameter ( const diff_sptr d)

Test if a diff node represents the difference between a variadic parameter and something else.

Parameters
dthe diff node to consider.
Returns
true iff d is a diff node that represents the difference between a variadic parameter and something else.

Definition at line 13193 of file abg-comparison.cc.

◆ is_diff_of_variadic_parameter_type() [1/2]

bool is_diff_of_variadic_parameter_type ( const diff d)

Test if a diff node represents the difference between a variadic parameter type and something else.

Parameters
dthe diff node to consider.
Returns
true iff d is a diff node that represents the difference between a variadic parameter type and something else.

Definition at line 13143 of file abg-comparison.cc.

◆ is_diff_of_variadic_parameter_type() [2/2]

bool is_diff_of_variadic_parameter_type ( const diff_sptr d)

Test if a diff node represents the difference between a variadic parameter type and something else.

Parameters
dthe diff node to consider.
Returns
true iff d is a diff node that represents the difference between a variadic parameter type and something else.

Definition at line 13167 of file abg-comparison.cc.

◆ is_distinct_diff()

const distinct_diff * is_distinct_diff ( const diff diff)

Test if a diff node is about differences between two diff nodes of different kinds.

Parameters
diffthe diff node to consider.
Returns
the diff converted into an instance of distintc_diff iff diff is about differences between two diff nodes of different kinds.

Definition at line 874 of file abg-comparison.cc.

◆ is_enum_diff()

const enum_diff * is_enum_diff ( const diff diff)

Test if a diff node is a enum_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to ad enum_diff node iff diff is a enum_diff node.

Definition at line 648 of file abg-comparison.cc.

◆ is_fn_parm_diff()

const fn_parm_diff * is_fn_parm_diff ( const diff diff)

Test if a diff node is about differences between two function parameters.

Parameters
diffthe diff node to consider.
Returns
the diff converted into an instance of reference_diff iff diff is about differences between two function parameters.

Definition at line 850 of file abg-comparison.cc.

◆ is_function_decl_diff()

const function_decl_diff * is_function_decl_diff ( const diff diff)

Test if a diff node is about differences between functions.

Parameters
diffthe diff node to test.
Returns
a pointer to the actual var_diff that diff is a type of, iff it is about differences between variables.

Definition at line 767 of file abg-comparison.cc.

◆ is_function_type_diff()

const function_type_diff * is_function_type_diff ( const diff diff)

Test if a diff node is a function_type_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a function_type_diff iff diff is a function_type_diff node.

Definition at line 725 of file abg-comparison.cc.

◆ is_function_type_diff_with_local_changes()

const function_type_diff * is_function_type_diff_with_local_changes ( const diff diff)

Test if a given diff node carries a function type change with local changes.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a function_type_diff iff diff is a function_type_diff node that carries a local change.

Definition at line 736 of file abg-comparison.cc.

◆ is_pointer_diff()

const pointer_diff * is_pointer_diff ( const diff diff)

Test if a diff node is about differences between two pointers.

Parameters
diffthe diff node to consider.
Returns
the diff converted into an instance of pointer_diff iff diff is about differences between two pointers.

Definition at line 783 of file abg-comparison.cc.

◆ is_qualified_type_diff()

const qualified_type_diff * is_qualified_type_diff ( const diff diff)

Test if a diff node is about differences between two qualified types.

Parameters
diffthe diff node to consider.
Returns
diff converted into an instance of qualified_type_diff iff diff is about differences between two qualified types.

Definition at line 806 of file abg-comparison.cc.

◆ is_reference_diff()

const reference_diff * is_reference_diff ( const diff diff)

Test if a diff node is about differences between two references.

Parameters
diffthe diff node to consider.
Returns
the diff converted into an instance of reference_diff iff diff is about differences between two references.

Definition at line 794 of file abg-comparison.cc.

◆ is_reference_or_ptr_diff_to_non_basic_nor_distinct_types()

bool abigail::comparison::is_reference_or_ptr_diff_to_non_basic_nor_distinct_types ( const diff diff)

Test if a diff node is a reference or pointer diff node to a change that is neither basic type change nor distinct type change.

Note that this function also works on diffs of typedefs of reference or pointer.

Parameters
diffthe diff node to consider.
Returns
true iff diff is a eference or pointer diff node to a change that is neither basic type change nor distinct type change.

Definition at line 820 of file abg-comparison.cc.

◆ is_subrange_diff()

const subrange_diff * is_subrange_diff ( const diff diff)

Test if a diff node is a subrange_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a subrange_diff iff diff is a subrange_diff node.

Definition at line 705 of file abg-comparison.cc.

◆ is_type_diff()

const type_diff_base * is_type_diff ( const diff diff)

Test if a diff node is about differences between types.

Parameters
diffthe diff node to test.
Returns
a pointer to the actual type_diff_base* that diff extends, iff it is about differences between types.

Definition at line 618 of file abg-comparison.cc.

◆ is_typedef_diff()

const typedef_diff * is_typedef_diff ( const diff diff)

Test if a diff node is a typedef_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a typedef_diff iff diff is a typedef_diff node.

Definition at line 695 of file abg-comparison.cc.

◆ is_union_diff()

const union_diff * is_union_diff ( const diff diff)

Test if a diff node is a union_diff node.

Parameters
diffthe diff node to consider.
Returns
a non-nil pointer to a union_diff iff diff is a union_diff node.

Definition at line 658 of file abg-comparison.cc.

◆ is_var_diff()

const var_diff * is_var_diff ( const diff diff)

Test if a diff node is about differences between variables.

Parameters
diffthe diff node to test.
Returns
a pointer to the actual var_diff that diff is a type of, iff it is about differences between variables.

Definition at line 752 of file abg-comparison.cc.

◆ maybe_convert_bits_to_bytes()

uint64_t maybe_convert_bits_to_bytes ( uint64_t  bits,
const diff_context ctxt 
)

Convert a bits value into a byte value if the current diff context instructs us to do so.

Parameters
bitsthe bits value to convert.
ctxtthe current diff context to consider.
Returns
the resulting bits or bytes value, depending on what the diff context instructs us to do.

Definition at line 58 of file abg-reporter-priv.cc.

◆ maybe_report_base_class_reordering()

void maybe_report_base_class_reordering ( const class_diff d,
ostream &  out,
const string &  indent 
)

Report about the base classes of a class having been re-ordered.

Parameters
dthe class diff to consider.
outthe output stream to report the change to.
indentthe indentation string to use.

Definition at line 1609 of file abg-reporter-priv.cc.

◆ maybe_report_data_members_replaced_by_anon_dm()

void maybe_report_data_members_replaced_by_anon_dm ( const class_or_union_diff d,
ostream &  out,
const string &  indent 
)

Report about data members replaced by an anonymous data member without changing the overall bit-layout of the class or union in an ABI-meaningful way.

Parameters
dthe diff to consider.
outthe output stream to emit the change report to.
indentthe indentation string to use.

Definition at line 1535 of file abg-reporter-priv.cc.

◆ maybe_report_diff_for_member()

bool maybe_report_diff_for_member ( const decl_base_sptr &  decl1,
const decl_base_sptr &  decl2,
const diff_context_sptr ctxt,
ostream &  out,
const string &  indent 
)

Report the differences in access specifiers and static-ness for class members.

Parameters
decl1the first class member to consider.
decl2the second class member to consider.
outthe output stream to send the report to.
indentthe indentation string to use for the report.
Returns
true if something was reported, false otherwise.

Definition at line 1108 of file abg-reporter-priv.cc.

◆ maybe_report_diff_for_symbol()

void maybe_report_diff_for_symbol ( const elf_symbol_sptr symbol1,
const elf_symbol_sptr symbol2,
const diff_context_sptr ctxt,
ostream &  out,
const string &  indent 
)

Report the difference between two ELF symbols, if there is any.

Parameters
symbol1the first symbol to consider.
symbol2the second symbol to consider.
ctxtthe diff context.
theoutput stream to emit the report to.
indentthe indentation string to use.

Definition at line 1204 of file abg-reporter-priv.cc.

◆ maybe_report_diff_for_variable()

bool maybe_report_diff_for_variable ( const decl_base_sptr &  decl1,
const decl_base_sptr &  decl2,
const diff_context_sptr ctxt,
ostream &  out,
const string &  indent 
)

Report the differences between two generic variables.

Parameters
decl1the first version of the variable.
decl2the second version of the variable.
ctxtthe context of the diff.
outthe output stream to emit the change report to.
indentthe indentation prefix to emit.
Returns
true if any text has been emitted to the output stream.

Definition at line 1163 of file abg-reporter-priv.cc.

◆ maybe_report_interfaces_impacted_by_diff() [1/2]

void maybe_report_interfaces_impacted_by_diff ( const diff d,
ostream &  out,
const string &  indent 
)

If a given diff node impacts some public interfaces, then report about those impacted interfaces on a given output stream.

Parameters
dthe diff node to get the impacted interfaces for.
outthe output stream to report to.
indentthe white space string to use for indentation.

Definition at line 1462 of file abg-reporter-priv.cc.

◆ maybe_report_interfaces_impacted_by_diff() [2/2]

void maybe_report_interfaces_impacted_by_diff ( const diff_sptr d,
ostream &  out,
const string &  indent 
)

If a given diff node impacts some public interfaces, then report about those impacted interfaces on standard output.

Parameters
dthe diff node to get the impacted interfaces for.
outthe output stream to report to.
indentthe white space string to use for indentation.

Definition at line 1511 of file abg-reporter-priv.cc.

◆ maybe_report_unreachable_type_changes()

void maybe_report_unreachable_type_changes ( const corpus_diff d,
const corpus_diff::diff_stats s,
const string &  indent,
ostream &  out 
)

Report changes about types that are not reachable from global functions and variables, in a given.

Parameters
corpus_diff.
dthe corpus_diff to consider.
sthe statistics of the changes, after filters and suppressions are reported. This is typically what is returned by corpus_diff::apply_filters_and_suppressions_before_reporting().
indentthe indendation string (usually a string of white spaces) to use for indentation during the reporting.
outthe output stream to emit the report to.

Definition at line 1350 of file abg-reporter-priv.cc.

◆ maybe_show_relative_offset_change()

void maybe_show_relative_offset_change ( const var_diff_sptr diff,
diff_context ctxt,
ostream &  out 
)

If a given var_diff node carries a data member change in which the offset of the data member actually changed, then emit a string (to an output stream) that represents that offset change.

For instance, if the offset of the data member increased by 32 bits then the string emitted is going to be "by +32 bits".

If, on the other hand, the offset of the data member decreased by 64 bits then the string emitted is going to be "by -64 bits".

This function is a sub-routine used by the reporting system.

Parameters
diffthe diff node that potentially carries the data member change.
ctxtthe context in which the diff is being reported.
outthe output stream to emit the string to.

Definition at line 279 of file abg-reporter-priv.cc.

◆ maybe_show_relative_size_change()

void maybe_show_relative_size_change ( const var_diff_sptr diff,
diff_context ctxt,
ostream &  out 
)

If a given var_diff node carries a hange in which the size of the variable actually changed, then emit a string (to an output stream) that represents that size change.

For instance, if the size of the variable increased by 32 bits then the string emitted is going to be "by +32 bits".

If, on the other hand, the size of the variable decreased by 64 bits then the string emitted is going to be "by -64 bits".

This function is a sub-routine used by the reporting system.

Parameters
diffthe diff node that potentially carries the variable change.
ctxtthe context in which the diff is being reported.
outthe output stream to emit the string to.

Definition at line 338 of file abg-reporter-priv.cc.

◆ operator&()

visiting_kind operator& ( visiting_kind  l,
visiting_kind  r 
)

The overloaded and operator for visiting_kind.

Definition at line 600 of file abg-comparison.cc.

◆ operator<<()

ostream & operator<< ( ostream &  o,
diff_category  c 
)

Serialize an instance of diff_category to an output stream.

Parameters
othe output stream to serialize c to.
cthe instance of diff_category to serialize.
Returns
the output stream to serialize c to.

Definition at line 3136 of file abg-comparison.cc.

◆ operator|()

visiting_kind operator| ( visiting_kind  l,
visiting_kind  r 
)

The overloaded or operator for visiting_kind.

Definition at line 594 of file abg-comparison.cc.

◆ operator~()

visiting_kind operator~ ( visiting_kind  l)

The overloaded 'bit inversion' operator for visiting_kind.

Definition at line 608 of file abg-comparison.cc.

◆ peel_fn_parm_diff()

const diff * peel_fn_parm_diff ( const diff dif)

If a diff node is about changes between two function parameters get the diff node about changes between the types of the parameters.

Parameters
difthe dif node to consider.
Returns
the diff of the types of the parameters.

Definition at line 13308 of file abg-comparison.cc.

◆ peel_pointer_diff()

const diff * peel_pointer_diff ( const diff dif)

If a diff node is about changes between two pointer types, get the diff node about changes between the underlying (pointed-to) types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not pointers.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not a pointer diff node.

Definition at line 13253 of file abg-comparison.cc.

◆ peel_pointer_or_qualified_type_diff()

const diff * peel_pointer_or_qualified_type_diff ( const diff dif)

If a diff node is about changes between two pointer, reference or qualified types, get the diff node about changes between the underlying types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not pointer, reference or qualified.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not a pointer, reference or qualified diff node.

Definition at line 13329 of file abg-comparison.cc.

◆ peel_qualified_diff()

const diff * peel_qualified_diff ( const diff dif)

If a diff node is about changes between two qualified types, get the diff node about changes between the underlying (non-qualified) types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not qualified.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not a qualified diff node.

Definition at line 13293 of file abg-comparison.cc.

◆ peel_reference_diff()

const diff * peel_reference_diff ( const diff dif)

If a diff node is about changes between two reference types, get the diff node about changes between the underlying (pointed-to) types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not references.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not a reference diff node.

Definition at line 13273 of file abg-comparison.cc.

◆ peel_typedef_diff()

const diff * peel_typedef_diff ( const diff dif)

If a diff node is about changes between two typedef types, get the diff node about changes between the underlying types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not typedefs.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not a typedef diff node.

Definition at line 13234 of file abg-comparison.cc.

◆ peel_typedef_or_qualified_type_diff()

const diff * peel_typedef_or_qualified_type_diff ( const diff dif)

If a diff node is about changes between two typedefs or qualified types, get the diff node about changes between the underlying types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are not typedef or qualified types.

Parameters
difthe dif node to consider.
Returns
the underlying diff node of dif, or just return dif if it's not typedef or qualified diff node.

Definition at line 13358 of file abg-comparison.cc.

◆ peel_typedef_qualified_type_or_parameter_diff()

const diff * peel_typedef_qualified_type_or_parameter_diff ( const diff dif)

If a diff node is about changes between two typedefs or qualified types, get the diff node about changes between the underlying types.

Note that this function walks the tree of underlying diff nodes returns the first diff node about types that are neither typedef, qualified type nor parameters.

Parameters
difthe dif node to consider.
Returns
the diff node about changes between the underlying types.

Definition at line 13384 of file abg-comparison.cc.

◆ print_diff_tree() [1/4]

void print_diff_tree ( corpus_diff diff_tree,
std::ostream &  out 
)

Emit a textual representation of a corpus_diff tree to an output stream.

Parameters
diff_treethe corpus_diff tree to emit the textual representation for.
outthe output stream to emit the textual representation for diff_tree to.

Definition at line 12714 of file abg-comparison.cc.

◆ print_diff_tree() [2/4]

void print_diff_tree ( corpus_diff_sptr  diff_tree,
std::ostream &  o 
)

Emit a textual representation of a corpus_diff tree to an output stream.

Parameters
diff_treethe corpus_diff tree to emit the textual representation for.
outthe output stream to emit the textual representation for diff_tree to.

Definition at line 12745 of file abg-comparison.cc.

◆ print_diff_tree() [3/4]

void abigail::comparison::print_diff_tree ( diff diff_tree,
ostream &  out 
)

Emit a textual representation of a diff sub-tree to an output stream.

Parameters
diff_treethe sub-tree to emit the textual representation for.
outthe output stream to emit the textual representation for diff_tree to.

Definition at line 12696 of file abg-comparison.cc.

◆ print_diff_tree() [4/4]

void print_diff_tree ( diff_sptr  diff_tree,
std::ostream &  o 
)

Emit a textual representation of a diff sub-tree to an output stream.

Parameters
diff_treethe sub-tree to emit the textual representation for.
outthe output stream to emit the textual representation for diff_tree to.

Definition at line 12732 of file abg-comparison.cc.

◆ propagate_categories() [1/4]

void propagate_categories ( corpus_diff diff_tree)

Visit all the nodes of a given corpus tree. For each node that has a particular category set, propagate that category set up to its parent nodes.

Parameters
diff_treethe corpus_diff tree to walk for categorization purpose;

Definition at line 12224 of file abg-comparison.cc.

◆ propagate_categories() [2/4]

void propagate_categories ( corpus_diff_sptr  diff_tree)

Visit all the nodes of a given corpus tree. For each node that has a particular category set, propagate that category set up to its parent nodes.

Parameters
diff_treethe corpus_diff tree to walk for categorization purpose;

Definition at line 12240 of file abg-comparison.cc.

◆ propagate_categories() [3/4]

void propagate_categories ( diff diff_tree)

Visit all the nodes of a given sub-tree. For each node that has a particular category set, propagate that category set up to its parent nodes.

Parameters
diff_treethe diff sub-tree to walk for categorization purpose;

Definition at line 12197 of file abg-comparison.cc.

◆ propagate_categories() [4/4]

void propagate_categories ( diff_sptr  diff_tree)

Visit all the nodes of a given sub-tree. For each node that has a particular category set, propagate that category set up to its parent nodes.

Parameters
diff_treethe diff sub-tree to walk for categorization purpose;

Definition at line 12214 of file abg-comparison.cc.

◆ report_loc_info()

bool report_loc_info ( const type_or_decl_base_sptr tod,
const diff_context ctxt,
ostream &  out 
)
Parameters
todthe type or declaration to emit loc info about
ctxtthe content of the current diff.
outthe output stream to report the change to.
Returns
true iff something was reported.

Definition at line 920 of file abg-reporter-priv.cc.

◆ report_mem_header() [1/2]

void report_mem_header ( ostream &  out,
diff_kind  k,
const string &  section_name,
const string &  indent 
)

Output the header preceding the the report for insertion/deletion/change of a part of a class. This is a subroutine of class_diff::report.

Parameters
outthe output stream to output the report to.
kthe kind of diff (insertion/deletion/change) we want the head to introduce.
section_namethe name of the sub-part of the class to report about.
indentthe string to use as indentation prefix in the header.

Definition at line 1071 of file abg-reporter-priv.cc.

◆ report_mem_header() [2/2]

void report_mem_header ( ostream &  out,
size_t  number,
size_t  num_filtered,
diff_kind  k,
const string &  section_name,
const string &  indent 
)

Output the header preceding the the report for insertion/deletion/change of a part of a class. This is a subroutine of class_diff::report.

Parameters
outthe output stream to output the report to.
numberthe number of insertion/deletion to refer to in the header.
num_filteredthe number of filtered changes.
kthe kind of diff (insertion/deletion/change) we want the head to introduce.
section_namethe name of the sub-part of the class to report about.
indentthe string to use as indentation prefix in the header.

Definition at line 1015 of file abg-reporter-priv.cc.

◆ report_name_size_and_alignment_changes()

void report_name_size_and_alignment_changes ( decl_base_sptr  first,
decl_base_sptr  second,
diff_context_sptr  ctxt,
ostream &  out,
const string &  indent 
)

Report the name, size and alignment changes of a type.

Parameters
firstthe first type to consider.
secondthe second type to consider.
ctxtthe content of the current diff.
outthe output stream to report the change to.
indentthe string to use for indentation.

Definition at line 963 of file abg-reporter-priv.cc.

◆ report_size_and_alignment_changes()

void report_size_and_alignment_changes ( type_or_decl_base_sptr  first,
type_or_decl_base_sptr  second,
diff_context_sptr  ctxt,
ostream &  out,
const string &  indent 
)

Report the size and alignment changes of a type.

Parameters
firstthe first type to consider.
secondthe second type to consider.
ctxtthe content of the current diff.
outthe output stream to report the change to.
indentthe string to use for indentation.

Definition at line 802 of file abg-reporter-priv.cc.

◆ represent() [1/3]

void represent ( const diff_context ctxt,
method_decl_sptr  mem_fn,
ostream &  out 
)

Stream a string representation for a member function.

Parameters
ctxtthe current diff context.
mem_fnthe member function to stream
outthe output stream to send the representation to

Definition at line 182 of file abg-reporter-priv.cc.

◆ represent() [2/3]

void represent ( const subrange_diff d,
const diff_context_sptr  ctxt,
ostream &  out,
const string &  indent,
bool  local_only 
)

Represent the changes carried by an instance of subrange_diff that represent a difference between two ranges.

Parameters
diffdiff the diff node to represent.
ctxtthe diff context to use.
local_onlyif true, only display local changes.
outthe output stream to send the representation to.
indentthe indentation string to use for the change report.

Definition at line 732 of file abg-reporter-priv.cc.

◆ represent() [3/3]

void represent ( const var_diff_sptr diff,
diff_context_sptr  ctxt,
ostream &  out,
const string &  indent,
bool  local_only 
)

Represent the changes carried by an instance of var_diff that represent a difference between two class data members.

Parameters
diffdiff the diff node to represent.
ctxtthe diff context to use.
local_onlyif true, only display local changes.
outthe output stream to send the representation to.
indentthe indentation string to use for the change report.

Definition at line 391 of file abg-reporter-priv.cc.

◆ represent_data_member()

void represent_data_member ( var_decl_sptr  d,
const diff_context_sptr ctxt,
ostream &  out,
const string &  indent 
)

Stream a string representation for a data member.

Parameters
dthe data member to stream
ctxtthe current diff context.
outthe output stream to send the representation to
indentthe indentation string to use for the change report.

Definition at line 232 of file abg-reporter-priv.cc.

◆ show_linkage_name_and_aliases()

void show_linkage_name_and_aliases ( ostream &  out,
const string &  indent,
const elf_symbol symbol,
const string_elf_symbols_map_type sym_map 
)

For a given symbol, emit a string made of its name and version. The string also contains the list of symbols that alias this one.

Parameters
outthe output string to emit the resulting string to.
indentthe indentation string to use before emitting the resulting string.
symbolthe symbol to emit the representation string for.
sym_mapthe symbol map to consider to look for aliases of symbol.

Definition at line 1323 of file abg-reporter-priv.cc.

◆ show_numerical_change()

void show_numerical_change ( const string &  what,
uint64_t  old_bits,
uint64_t  new_bits,
const diff_context ctxt,
ostream &  out,
bool  show_bits_or_byte 
)

Emit a message showing the numerical change between two values, to a given output stream.

The function emits a message like

"XXX changes from old_bits to new_bits (in bits)"

or

"XXX changes from old_bits to new_bits (in bytes)"

Depending on if the current diff context instructs us to emit the change in bits or bytes. XXX is the string content of the what parameter.

Parameters
whatthe string that tells us what the change represents. This is the "XXX" we refer to in the explanation above.
old_bitsthe initial value (which changed) in bits.
new_bitsthe final value (resulting from the change or old_bits) in bits.
ctxtthe current diff context to consider.
outthe output stream to send the change message to.
show_bits_or_byteif this is true, then the message is going to precise if the changed value is in bits or bytes. Otherwise, no mention of that is made.

Definition at line 96 of file abg-reporter-priv.cc.

◆ show_offset_or_size() [1/2]

void show_offset_or_size ( const string &  what,
uint64_t  value,
const diff_context ctxt,
ostream &  out 
)

Emit a message showing the value of a numerical value representing a size or an offset, preceded by a string. The message is ended by a part which says if the value is in bits or bytes.

Parameters
whatthe string prefix of the message to emit.
valuethe numerical value to emit.
ctxtthe diff context to take into account.
outthe output stream to emit the message to.

Definition at line 139 of file abg-reporter-priv.cc.

◆ show_offset_or_size() [2/2]

void show_offset_or_size ( uint64_t  value,
const diff_context ctxt,
ostream &  out 
)

Emit a message showing the value of a numerical value representing a size or an offset. The message is ended by a part which says if the value is in bits or bytes.

Parameters
valuethe numerical value to emit.
ctxtthe diff context to take into account.
outthe output stream to emit the message to.

Definition at line 169 of file abg-reporter-priv.cc.

◆ sort_artifacts_set()

void sort_artifacts_set ( const artifact_sptr_set_type set,
vector< type_or_decl_base_sptr > &  sorted 
)

Sort the set of ABI artifacts contained in a artifact_sptr_set_type.

Parameters
setthe set of ABI artifacts to sort.
outputparameter the vector containing the sorted ABI artifacts.

Definition at line 503 of file abg-comparison.cc.

◆ sort_changed_data_members()

void sort_changed_data_members ( changed_var_sptrs_type to_sort)

Sort (in place) a vector of changed data members.

Parameters
to_sortthe vector to sort.

Definition at line 165 of file abg-comparison.cc.

◆ sort_changed_enumerators()

void sort_changed_enumerators ( const string_changed_enumerator_map enumerators_map,
changed_enumerators_type sorted 
)

Sort a map of changed enumerators.

Parameters
enumerators_mapthe map to sort.
outputparameter. The resulting sorted enumerators.

Definition at line 129 of file abg-comparison.cc.

◆ sort_data_members()

void sort_data_members ( const string_decl_base_sptr_map data_members,
vector< decl_base_sptr > &  sorted 
)

Sort a map of data members by the offset of their initial value.

Parameters
data_membersthe map of changed data members to sort.
sortedthe resulting vector of sorted changed data members.

Definition at line 148 of file abg-comparison.cc.

◆ sort_enumerators()

void sort_enumerators ( const string_enumerator_map enumerators_map,
enum_type_decl::enumerators sorted 
)

Sort a map of enumerators by their value.

Parameters
enumerators_mapthe map to sort.
sortedthe resulting vector of sorted enumerators.

Definition at line 112 of file abg-comparison.cc.

◆ sort_string_base_diff_sptr_map()

void sort_string_base_diff_sptr_map ( const string_base_diff_sptr_map map,
base_diff_sptrs_type sorted 
)

Sort a map of string -> base_diff_sptr into a sorted vector of base_diff_sptr. The base_diff_sptr are sorted by increasing value of their offset in their containing type.

Parameters
mapthe input map to sort.
sortedthe resulting sorted vector.

Definition at line 408 of file abg-comparison.cc.

◆ sort_string_base_sptr_map()

void sort_string_base_sptr_map ( const string_base_sptr_map m,
class_decl::base_specs sorted 
)

Lexicographically sort base specifications found in instances of string_base_sptr_map.

Definition at line 422 of file abg-comparison.cc.

◆ sort_string_data_member_diff_sptr_map()

void sort_string_data_member_diff_sptr_map ( const string_var_diff_sptr_map map,
var_diff_sptrs_type sorted 
)

Sort the values of a string_var_diff_sptr_map and store the result in a vector of var_diff_sptr.

Parameters
mapthe map of changed data members to sort.
sortedthe resulting vector of var_diff_sptr.

Definition at line 304 of file abg-comparison.cc.

◆ sort_string_diff_ptr_map()

void sort_string_diff_ptr_map ( const string_diff_ptr_map map,
diff_ptrs_type sorted 
)

Sort a map ofg string -> diff* into a vector of diff_ptr. The diff_ptr are sorted lexicographically wrt qualified names of their first subjects.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector.

Definition at line 387 of file abg-comparison.cc.

◆ sort_string_diff_sptr_map()

void sort_string_diff_sptr_map ( const string_diff_sptr_map map,
diff_sptrs_type sorted 
)

Sort a map ofg string -> diff_sptr into a vector of diff_sptr. The diff_sptr are sorted lexicographically wrt qualified names of their first subjects.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector.

Definition at line 366 of file abg-comparison.cc.

◆ sort_string_elf_symbol_map()

void sort_string_elf_symbol_map ( const string_elf_symbol_map map,
vector< elf_symbol_sptr > &  sorted 
)

Sort a map of string -> pointer to elf_symbol.

The result is a vector of elf_symbol_sptr sorted by the name of the symbol.

Parameters
mapthe map to sort.
sortedout parameter; the sorted vector of elf_symbol_sptr.

Definition at line 264 of file abg-comparison.cc.

◆ sort_string_fn_parm_diff_sptr_map() [1/2]

void sort_string_fn_parm_diff_sptr_map ( const string_fn_parm_diff_sptr_map map,
vector< fn_parm_diff_sptr > &  sorted 
)

Sort a map of changed function parameters by the indexes of the function parameters.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector of instances of fn_parm_diff_sptr

Definition at line 463 of file abg-comparison.cc.

◆ sort_string_fn_parm_diff_sptr_map() [2/2]

void sort_string_fn_parm_diff_sptr_map ( const unsigned_fn_parm_diff_sptr_map map,
vector< fn_parm_diff_sptr > &  sorted 
)

Sort a map of fn_parm_diff by the indexes of the function parameters.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector of changed function parms.

Definition at line 442 of file abg-comparison.cc.

◆ sort_string_function_decl_diff_sptr_map()

void sort_string_function_decl_diff_sptr_map ( const string_function_decl_diff_sptr_map map,
function_decl_diff_sptrs_type sorted 
)

Sort the values of a string_function_decl_diff_sptr_map map and store the result in a vector of function_decl_diff_sptr objects.

Parameters
mapthe map whose values to store.
sortedthe vector of function_decl_diff_sptr to store the result of the sort into.

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

◆ sort_string_function_ptr_map()

void sort_string_function_ptr_map ( const string_function_ptr_map map,
vector< function_decl * > &  sorted 
)

Sort an instance of string_function_ptr_map map and stuff a resulting sorted vector of pointers to function_decl.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector.

Definition at line 178 of file abg-comparison.cc.

◆ sort_string_member_function_sptr_map()

void sort_string_member_function_sptr_map ( const string_member_function_sptr_map map,
class_or_union::member_functions sorted 
)

Sort a map that's an instance of string_member_function_sptr_map and fill a vector of member functions with the sorted result.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector.

Definition at line 199 of file abg-comparison.cc.

◆ sort_string_parm_map()

void sort_string_parm_map ( const string_parm_map map,
vector< function_decl::parameter_sptr > &  sorted 
)

Sort a map of string -> function parameters.

Parameters
mapthe map to sort.
sortedthe resulting sorted vector of vector<function_decl::parameter_sptr>

Definition at line 483 of file abg-comparison.cc.

◆ sort_string_type_base_sptr_map()

void sort_string_type_base_sptr_map ( string_type_base_sptr_map map,
vector< type_base_sptr > &  sorted 
)

Sort a map of string to type_base_sptr entities.

The entries are sorted based on the lexicographic order of the pretty representation of the type_sptr_sptr. The sorted result is put in a vector of type_base_sptr.

Parameters
mapthe map to sort.
sortedthe resulting vector of type_base_sptr lexicographically sorted using their pretty representation.

Definition at line 527 of file abg-comparison.cc.

◆ sort_string_var_diff_sptr_map()

void sort_string_var_diff_sptr_map ( const string_var_diff_sptr_map map,
var_diff_sptrs_type sorted 
)

Sort of an instance of string_var_diff_sptr_map map.

Parameters
mapthe input map to sort.
sortedthe ouptut sorted vector of var_diff_sptr. It's populated with the sorted content.

Definition at line 241 of file abg-comparison.cc.

◆ sort_string_var_ptr_map()

void sort_string_var_ptr_map ( const string_var_ptr_map map,
vector< var_decl * > &  sorted 
)

Sort a map of string -> pointer to var_decl.

The result is a vector of var_decl* sorted by the qualified name of the variables.

Parameters
mapthe map to sort.
sortedout parameter; the sorted vector of var_decl.

Definition at line 285 of file abg-comparison.cc.

◆ sort_string_virtual_member_function_diff_sptr_map()

void sort_string_virtual_member_function_diff_sptr_map ( const string_function_decl_diff_sptr_map map,
function_decl_diff_sptrs_type sorted 
)

Sort an map of string -> virtual member function into a vector of virtual member functions. The virtual member functions are sorted by increasing order of their virtual index.

Parameters
mapthe input map.
sortedthe resulting sorted vector of virtual function member.

Definition at line 344 of file abg-comparison.cc.

◆ sort_unsigned_data_member_diff_sptr_map()

void sort_unsigned_data_member_diff_sptr_map ( const unsigned_var_diff_sptr_map  map,
var_diff_sptrs_type sorted 
)

Sort the values of a unsigned_var_diff_sptr_map map and store the result into a vector of var_diff_sptr.

Parameters
mapthe map of changed data members to sort.
sortedthe resulting vector of sorted var_diff_sptr.

Definition at line 323 of file abg-comparison.cc.

◆ try_to_diff()

diff_sptr abigail::comparison::try_to_diff ( const type_or_decl_base_sptr  first,
const type_or_decl_base_sptr  second,
diff_context_sptr  ctxt 
)

</distinct_diff>

Try to compute a diff on two instances of DiffType representation.

The function template performs the diff if and only if the decl representations are of a DiffType.

@tparm DiffType the type of instances to diff.

Parameters
firstthe first representation of decl to consider in the diff computation.
secondthe second representation of decl to consider in the diff computation.
ctxtthe diff context to use.
Returns
the diff of the two types first and second if and only if they represent the parametrized type DiffType. Otherwise, returns a NULL pointer value.

Definition at line 2936 of file abg-comparison.cc.

◆ try_to_diff< class_decl >()

This is a specialization of try_to_diff() template to diff instances of class_decl.

Parameters
firstthe first representation of decl to consider in the diff computation.
secondthe second representation of decl to consider in the diff computation.
ctxtthe diff context to use.

Definition at line 2964 of file abg-comparison.cc.