16 #ifndef __ABG_COMPARISON_PRIV_H__
17 #define __ABG_COMPARISON_PRIV_H__
19 #include "abg-internal.h"
22 #include <unordered_set>
23 ABG_BEGIN_EXPORT_DECLARATIONS
26 #include "abg-suppression.h"
41 using std::unordered_set;
46 using std::dynamic_pointer_cast;
47 using std::static_pointer_cast;
58 operator()(
const types_or_decls_type& d)
const
70 operator()(
const types_or_decls_type &d1,
const types_or_decls_type &d2)
const
71 {
return d1.first == d2.first && d1.second == d2.second;}
91 {
return operator()(*d);}
100 {
return operator()(*d);}
112 return reinterpret_cast<size_t>(canonical_diff);
129 {
return operator()(*d1, *d2);}
140 {
return operator()(*d1, *d2);}
158 return canonical_diff1 == canonical_diff2;
175 vector<diff_sptr> canonical_diffs;
176 vector<filtering::filter_base_sptr> filters_;
190 ostream* default_output_stream_;
191 ostream* error_output_stream_;
192 bool perform_change_categorization_;
193 bool leaf_changes_only_;
194 bool forbid_visiting_a_node_twice_;
195 bool reset_visited_diffs_for_each_interface_;
197 bool show_offsets_sizes_in_bits_;
198 bool show_relative_offset_changes_;
199 bool show_stats_only_;
200 bool show_soname_change_;
201 bool show_architecture_change_;
202 bool show_deleted_fns_;
203 bool show_changed_fns_;
204 bool show_added_fns_;
205 bool show_deleted_vars_;
206 bool show_changed_vars_;
207 bool show_added_vars_;
208 bool show_linkage_names_;
210 bool show_redundant_changes_;
211 bool show_syms_unreferenced_by_di_;
212 bool show_added_syms_unreferenced_by_di_;
213 bool show_unreachable_types_;
214 bool show_impacted_interfaces_;
215 bool dump_diff_tree_;
221 default_output_stream_(),
222 error_output_stream_(),
223 perform_change_categorization_(
true),
224 leaf_changes_only_(),
225 forbid_visiting_a_node_twice_(
true),
226 reset_visited_diffs_for_each_interface_(),
228 show_offsets_sizes_in_bits_(
true),
229 show_relative_offset_changes_(
true),
230 show_stats_only_(
false),
231 show_soname_change_(
true),
232 show_architecture_change_(
true),
233 show_deleted_fns_(
true),
234 show_changed_fns_(
true),
235 show_added_fns_(
true),
236 show_deleted_vars_(
true),
237 show_changed_vars_(
true),
238 show_added_vars_(
true),
239 show_linkage_names_(
false),
241 show_redundant_changes_(
true),
242 show_syms_unreferenced_by_di_(
true),
243 show_added_syms_unreferenced_by_di_(
true),
244 show_unreachable_types_(
false),
245 show_impacted_interfaces_(
true),
263 type_or_decl_base_sptr first_subject_;
264 type_or_decl_base_sptr second_subject_;
265 vector<diff*> children_;
267 diff* parent_interface_;
268 diff* canonical_diff_;
272 mutable bool reported_once_;
273 mutable bool currently_reporting_;
274 mutable string pretty_representation_;
280 priv(type_or_decl_base_sptr first_subject,
281 type_or_decl_base_sptr second_subject,
285 bool currently_reporting)
288 first_subject_(first_subject),
289 second_subject_(second_subject),
294 local_category_(category),
296 reported_once_(reported_once),
297 currently_reporting_(currently_reporting)
305 {
return ctxt_.lock();}
336 if (!ctxt->show_redundant_changes()
346 & (ctxt->get_allowed_category()
384 {
return operator()(l.get(), r.get());}
396 diff_sptr compatible_child_diff;
410 diff_sptr underlying_type_diff_;
413 : underlying_type_diff_(ud)
421 diff_sptr underlying_type_diff_;
424 : underlying_type_diff_(u)
432 vector<subrange_diff_sptr> subrange_diffs_;
434 priv(diff_sptr element_type_diff,
435 vector<subrange_diff_sptr>& subrange_diffs)
436 : element_type_diff_(element_type_diff),
437 subrange_diffs_(subrange_diffs)
443 diff_sptr underlying_type_diff_;
444 priv(diff_sptr underlying)
445 : underlying_type_diff_(underlying)
452 diff_sptr member_type_diff_;
453 diff_sptr containing_type_diff_;
455 priv(
const diff_sptr& member_type_diff,
456 const diff_sptr& containing_type_diff)
457 : member_type_diff_(member_type_diff),
458 containing_type_diff_(containing_type_diff)
464 diff_sptr underlying_type_diff;
465 mutable diff_sptr leaf_underlying_type_diff;
467 priv(diff_sptr underlying)
468 : underlying_type_diff(underlying)
474 diff_sptr underlying_type_diff_;
475 edit_script enumerators_changes_;
480 priv(diff_sptr underlying)
481 : underlying_type_diff_(underlying)
502 {
return f.first.get_value() < s.first.get_value();}
508 edit_script member_types_changes_;
509 edit_script data_members_changes_;
510 edit_script member_fns_changes_;
511 edit_script member_fn_tmpls_changes_;
512 edit_script member_class_tmpls_changes_;
550 type_or_decl_base_sptr
551 member_type_has_changed(decl_base_sptr)
const;
554 subtype_changed_dm(decl_base_sptr)
const;
557 member_class_tmpl_has_changed(decl_base_sptr)
const;
560 get_deleted_non_static_data_members_number()
const;
563 get_inserted_non_static_data_members_number()
const;
566 count_filtered_subtype_changed_dm(
bool local_only =
false);
569 count_filtered_changed_dm(
bool local_only =
false);
607 if (first_offset != second_offset)
608 return first_offset < second_offset;
610 string first_dm_name = first_dm->get_name();
611 string second_dm_name = second_dm->get_name();
615 return first_dm_name < second_dm_name;
627 const decl_base_sptr& s)
const
632 return compare_data_members(first_dm, second_dm);
649 return compare_data_members(first_dm, second_dm);
657 edit_script base_changes_;
664 vector<class_decl::base_spec_sptr> moved_bases_;
670 count_filtered_bases();
690 {
return operator()(*l, *r);}
700 if (f->get_offset_in_bits() >= 0
701 && s->get_offset_in_bits() >= 0)
702 return f->get_offset_in_bits() < s->get_offset_in_bits();
704 return (f->get_base_class()->get_pretty_representation()
705 < s->get_base_class()->get_pretty_representation());
710 {
return operator()(*l, *r);}
714 {
return operator()(l.get(), r.get());}
755 string name1 = first_dm->get_qualified_name();
756 string name2 = second_dm->get_qualified_name();
759 return name1 < name2;
765 first_dm = f->second_var();
766 second_dm = s->second_var();
780 name1 = first_dm->get_qualified_name();
781 name2 = second_dm->get_qualified_name();
783 return name1 < name2;
800 if (l_offset != r_offset)
801 return l_offset < r_offset;
809 {
return operator()(*l, *r);}
814 {
return operator()(l.get(), r.get());}
822 : underlying_class_diff_(underlying)
829 edit_script member_changes_;
901 {
return operator()(*l, *r);}
911 {
return operator()(l.get(), r.get());}
916 mutable diff_sptr type_diff;
921 diff_sptr return_type_diff_;
922 edit_script parm_changes_;
926 vector<function_decl::parameter_sptr> sorted_deleted_parms_;
928 vector<function_decl::parameter_sptr> sorted_added_parms_;
932 vector<fn_parm_diff_sptr> sorted_subtype_changed_parms_;
938 vector<fn_parm_diff_sptr> sorted_changed_parms_by_id_;
970 {
return operator()(*f, *s);}
989 {
return l.get_index() < r.get_index();}
1003 {
return operator()(*l, *r);}
1014 return name1 < name2;
1019 {
return operator()(*l, *r);}
1023 {
return operator()(l.get(), r.get());}
1034 return name1 < name2;
1039 {
return operator()(*l, *r);}
1043 {
return operator()(l.get(), r.get());}
1048 diff_sptr underlying_type_diff_;
1050 priv(
const diff_sptr underlying_type_diff)
1051 : underlying_type_diff_(underlying_type_diff)
1061 : first_(f), second_(s)
1068 string pretty_representation_;
1069 vector<diff*> children_;
1071 corpus_sptr second_;
1074 bool sonames_equal_;
1075 bool architectures_equal_;
1076 edit_script fns_edit_script_;
1077 edit_script vars_edit_script_;
1078 edit_script unrefed_fn_syms_edit_script_;
1079 edit_script unrefed_var_syms_edit_script_;
1102 edit_script unreachable_types_edit_script_;
1104 vector<type_base_sptr> deleted_unreachable_types_sorted_;
1107 vector<type_base_sptr> added_unreachable_types_sorted_;
1110 mutable vector<diff_sptr> changed_unreachable_types_sorted_;
1116 sonames_equal_(false),
1117 architectures_equal_(false)
1134 sonames_equal_(false),
1135 architectures_equal_(false)
1142 lookup_tables_empty()
const;
1145 clear_lookup_tables();
1148 ensure_lookup_tables_populated();
1151 apply_supprs_to_added_removed_fns_vars_unreachable_types();
1154 deleted_function_is_suppressed(
const function_decl* fn)
const;
1157 added_function_is_suppressed(
const function_decl* fn)
const;
1160 deleted_variable_is_suppressed(
const var_decl_sptr& var)
const;
1163 added_variable_is_suppressed(
const var_decl_sptr& var)
const;
1166 added_unreachable_type_is_suppressed(
const type_base *t)
const ;
1169 deleted_unreachable_type_is_suppressed(
const type_base *t)
const ;
1172 deleted_unrefed_fn_sym_is_suppressed(
const elf_symbol*)
const;
1175 added_unrefed_fn_sym_is_suppressed(
const elf_symbol*)
const;
1178 deleted_unrefed_var_sym_is_suppressed(
const elf_symbol*)
const;
1181 added_unrefed_var_sym_is_suppressed(
const elf_symbol*)
const;
1183 void count_leaf_changes(
size_t &num_changes,
size_t &num_filtered);
1185 void count_leaf_type_changes(
size_t &num_type_changes,
1186 size_t &num_type_changes_filtered);
1188 void count_unreachable_types(
size_t &num_added,
1189 size_t &num_removed,
1190 size_t &num_changed,
1191 size_t &num_filtered_added,
1192 size_t &num_filtered_removed,
1193 size_t &num_filtered_changed);
1196 changed_unreachable_types()
const;
1198 const vector<diff_sptr>&
1199 changed_unreachable_types_sorted()
const;
1207 const string& indent);
1210 categorize_redundant_changed_sub_nodes();
1216 maybe_dump_diff_tree();
1246 {
return operator()(*f, *s);}
1259 {
return operator()(f.get(), s.get());}
1297 {
return operator()(*first, *second);}
1323 size_t num_func_removed;
1324 size_t num_removed_func_filtered_out;
1325 size_t num_func_added;
1326 size_t num_added_func_filtered_out;
1327 size_t num_func_changed;
1328 size_t num_changed_func_filtered_out;
1329 size_t num_func_with_virt_offset_changes;
1330 size_t num_func_with_local_harmful_changes;
1331 size_t num_func_with_incompatible_changes;
1332 size_t num_var_with_local_harmful_changes;
1333 size_t num_var_with_incompatible_changes;
1334 size_t num_vars_removed;
1335 size_t num_removed_vars_filtered_out;
1336 size_t num_vars_added;
1337 size_t num_added_vars_filtered_out;
1338 size_t num_vars_changed;
1339 size_t num_changed_vars_filtered_out;
1340 size_t num_func_syms_removed;
1341 size_t num_removed_func_syms_filtered_out;
1342 size_t num_func_syms_added;
1343 size_t num_added_func_syms_filtered_out;
1344 size_t num_var_syms_removed;
1345 size_t num_removed_var_syms_filtered_out;
1346 size_t num_var_syms_added;
1347 size_t num_added_var_syms_filtered_out;
1348 size_t num_leaf_changes;
1349 size_t num_leaf_changes_filtered_out;
1350 size_t num_leaf_type_changes;
1351 size_t num_leaf_type_changes_filtered_out;
1352 size_t num_leaf_func_changes;
1353 size_t num_leaf_func_with_incompatible_changes;
1354 size_t num_leaf_func_changes_filtered_out;
1355 size_t num_leaf_var_changes;
1356 size_t num_leaf_var_with_incompatible_changes;
1357 size_t num_leaf_var_changes_filtered_out;
1358 size_t num_added_unreachable_types;
1359 size_t num_added_unreachable_types_filtered_out;
1360 size_t num_removed_unreachable_types;
1361 size_t num_removed_unreachable_types_filtered_out;
1362 size_t num_changed_unreachable_types;
1363 size_t num_changed_unreachable_types_filtered_out;
1368 num_removed_func_filtered_out(),
1370 num_added_func_filtered_out(),
1372 num_changed_func_filtered_out(),
1373 num_func_with_virt_offset_changes(),
1374 num_func_with_local_harmful_changes(),
1375 num_func_with_incompatible_changes(),
1376 num_var_with_local_harmful_changes(),
1377 num_var_with_incompatible_changes(),
1379 num_removed_vars_filtered_out(),
1381 num_added_vars_filtered_out(),
1383 num_changed_vars_filtered_out(),
1384 num_func_syms_removed(),
1385 num_removed_func_syms_filtered_out(),
1386 num_func_syms_added(),
1387 num_added_func_syms_filtered_out(),
1388 num_var_syms_removed(),
1389 num_removed_var_syms_filtered_out(),
1390 num_var_syms_added(),
1391 num_added_var_syms_filtered_out(),
1393 num_leaf_changes_filtered_out(),
1394 num_leaf_type_changes(),
1395 num_leaf_type_changes_filtered_out(),
1396 num_leaf_func_changes(),
1397 num_leaf_func_with_incompatible_changes(),
1398 num_leaf_func_changes_filtered_out(),
1399 num_leaf_var_changes(),
1400 num_leaf_var_with_incompatible_changes(),
1401 num_leaf_var_changes_filtered_out(),
1402 num_added_unreachable_types(),
1403 num_added_unreachable_types_filtered_out(),
1404 num_removed_unreachable_types(),
1405 num_removed_unreachable_types_filtered_out(),
1406 num_changed_unreachable_types(),
1407 num_changed_unreachable_types_filtered_out()
1412 {
return ctxt_.lock();}
1425 vector<decl_base_sptr>& sorted);
1432 vector<const function_decl*>& sorted);
1440 vector<type_base_sptr>& sorted);
1459 vector<elf_symbol_sptr>& sorted);
1463 vector<var_decl_sptr>& sorted);
1496 vector<fn_parm_diff_sptr>& sorted);
1499 vector<fn_parm_diff_sptr>& sorted);
1502 vector<function_decl::parameter_sptr>& sorted);
1506 vector<type_or_decl_base_sptr>& sorted);
1512 get_fn_decl_or_var_decl_diff_ancestor(
const diff *);
1521 #endif // __ABG_COMPARISON_PRIV_H__
vector< diff * > diff_ptrs_type
Convenience typedef for a vector of diff*.
std::pair< var_decl_sptr, var_decl_sptr > changed_var_sptr
Convenience typedef for a pair of var_decl_sptr representing a var_decl change. The first member of t...
A comparison function for instances of base_diff.
priv()
Default constructor of corpus_diff::priv.
bool operator()(const diff *l, const diff *r) const
An operator that takes two instances of diff_sptr returns true if its first operand compares less tha...
bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
void sort_enumerators(const string_enumerator_map &enumerators_map, enum_type_decl::enumerators &sorted)
Sort a map of enumerators by their value.
The abstraction of an enumerator.
shared_ptr< function_type_diff > function_type_diff_sptr
A convenience typedef for a shared pointer to function_type_type_diff.
A comparison functor for instances of diff.
shared_ptr< decl_diff_base > decl_diff_base_sptr
Convenience typedef for a shared_ptr of decl_diff_base.
vector< function_decl_diff_sptr > function_decl_diff_sptrs_type
Convenience typedef for a vector of function_decl_diff_sptr.
The private data of the ptr_to_mbr_diff type.
A "Less Than" functor to compare instance of function_decl_diff.
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 function...
This header declares filters for the diff trees resulting from comparing ABI Corpora.
bool operator()(const diff_sptr l, diff_sptr r) const
Lexicographically compare two diff nodes.
The abstraction of a change between two ABI artifacts, a.k.a an artifact change.
shared_ptr< class_diff > class_diff_sptr
Convenience typedef for a shared pointer on a class_diff type.
vector< var_diff_sptr > var_diff_sptrs_type
Convenience typedef for a vector of var_diff_sptr.
int64_t get_value() const
Getter for the value of enum_type_decl::enumerator.
const function_decl_sptr first_function_decl() const
The internal type for the impl idiom implementation of pointer_diff.
bool operator()(const diff *d1, const diff *d2) const
The function-call operator to compare two diff nodes.
bool is_data_member(const var_decl &v)
Test if a var_decl is a data member.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representatin of the current declaration.
Utilities to ease the wrapping of C types into std::shared_ptr.
An equality functor for types_or_decls_type.
bool operator()(const var_diff_sptr f, const var_diff_sptr s)
Return true if the first argument is less than the second one.
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.
bool operator()(const function_decl *f, const function_decl *s)
The actual "less than" operator for instances of function_decl. It returns true if the first function...
vector< changed_var_sptr > changed_var_sptrs_type
Convenience typedef for a vector of .gg381.
void sort_var_diffs(var_diff_sptrs_type &var_diffs)
Sort a vector of var_diff_sptr.
A special enumerator that is the logical 'or' all the enumerators above.
An abstraction helper for type declarations.
A functor to compare instances of elf_symbol base on their names.
size_t operator()(const diff &d) const
The function-call operator to hash a diff node.
void sort_function_decl_diffs(function_decl_diff_sptrs_type &fn_diffs)
Sort a vector of function_decl_diff_sptr.
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...
This means that a diff node was marked as suppressed by a user-provided suppression specification...
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...
bool operator()(const var_diff_sptr f, const var_diff_sptr s) const
type_or_decl_base_sptr first_subject() const
Getter of the first subject of the diff.
This means the diff node does not carry any (meaningful) change, or that it carries changes that have...
Abstraction of a base specifier in a class declaration.
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.
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
ssize_t get_member_function_vtable_offset(const function_decl &f)
Get the vtable offset of a member function.
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.
bool operator()(const function_decl &f, const function_decl &s)
The actual "less than" operator for instances of function_decl. It returns true if the first function...
bool compare_data_members(const var_decl_sptr &first_dm, const var_decl_sptr &second_dm) const
Compare two data members.
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
A diff node in this category has a parent node that is in the HAS_ALLOWED_CHANGE_CATEGORY category...
void sort_string_var_ptr_map(const string_var_ptr_map &map, vector< var_decl_sptr > &sorted)
Sort a map of string -> pointer to var_decl.
bool operator()(const fn_parm_diff &f, const fn_parm_diff &s)
class_decl::base_spec_sptr first_base() const
Getter for the first base spec of the diff object.
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
Abstraction of a diff between two function_decl.
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 lexicographic...
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...
unordered_set< diff_sptr, diff_sptr_hasher > unordered_diff_sptr_set
Convenience typedef for an unoredered set of diff_sptr.
hash_t combine_hashes(hash_t val1, hash_t val2)
Combine two hash values to produce a third hash value.
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.
Abstracts a variable declaration.
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 private data structure for distinct_diff.
void sort_string_parm_map(const string_parm_map &map, vector< function_decl::parameter_sptr > &sorted)
Sort a map of string -> function parameters.
A functor to compare instances of var_decl base on their qualified names.
diff_context_sptr get_context() const
Getter of the diff context associated with this diff.
bool is_diff_of_global_decls(const diff *)
Tests if a given diff node is to represent the changes between two gobal decls.
Abstraction of a function parameter.
The base class of diff between decls.
The base class of diff between types.
bool operator()(const function_decl_diff &first, const function_decl_diff &second)
The actual less than operator.
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...
unordered_map< string, base_diff_sptr > string_base_diff_sptr_map
Convenience typedef for a map of string and base_diff_sptr.
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.
The internal type for the impl idiom implementation of subrange_diff.
std::vector< enumerator > enumerators
Convenience typedef for a list of enumerator.
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...
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...
A functor to compare instances of class_decl::base_spec.
A functor to compare two instances of diff_sptr.
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_sp...
vector< changed_enumerator > changed_enumerators_type
Convenience typedef for a vector of changed enumerators.
uint64_t get_data_member_offset(const var_decl &m)
Get the offset of a data member.
diff_category
An enum for the different categories that a diff tree node falls into, regarding the kind of changes ...
Toplevel namespace for libabigail.
bool operator()(const changed_var_sptr &f, const changed_var_sptr &s) const
Compare two data members.
unordered_set< type_or_decl_base_sptr, type_or_decl_hash, type_or_decl_equal > artifact_sptr_set_type
A convenience typedef for a hash set of type_or_decl_base_sptr.
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...
An abstraction of a diff between two instances of class_decl::base_spec.
size_t operator()(const diff_sptr &d) const
The function-call operator to hash a diff node.
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
type_base_sptr get_leaf_type(qualified_type_def_sptr t)
Return the first underlying type that is not a qualified type.
virtual const interned_string & get_qualified_name(bool internal=false) const
Get the qualified name of a given variable or data member.
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.
shared_ptr< parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
The type of the private data of corpus_diff::diff_stats.
shared_ptr< diff_stats > diff_stats_sptr
A convenience typedef for a shared pointer to diff_stats.
size_t hash_type_or_decl(const type_or_decl_base *tod)
Hash an ABI artifact that is either a type or a decl.
shared_ptr< base_spec > base_spec_sptr
Convenience typedef.
diff_sptr element_type_diff_
The diff between the two array element types.
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.
This means that a diff node was warked as being for a private type. That is, the diff node is meant t...
Abstraction of a diff between two function parameters.
const function_decl::parameter_sptr first_parameter() const
Getter for the first subject of this diff node.
Abstraction for a function declaration.
bool operator()(const diff &l, diff &r) const
Lexicographically compare two diff nodes.
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...
unordered_map< string, function_decl_diff_sptr > 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.
bool operator()(const diff *l, diff *r) const
Lexicographically compare two diff nodes.
A hashing functor for types_or_decls_type.
priv(corpus_sptr first, corpus_sptr second, diff_context_sptr ctxt)
Constructor of corpus_diff::priv.
unordered_map< string, var_decl_sptr > string_var_ptr_map
Convenience typedef for a map which key is a string and which value is a point to var_decl...
A diff node in this category is redundant. That means it's present as a child of a other nodes in the...
shared_ptr< function_decl_diff > function_decl_diff_sptr
Convenience typedef for a shared pointer to a function_decl type.
Functor to sort instances of var_diff_sptr.
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.
diff * get_canonical_diff() const
Getter for the canonical diff of the current instance of diff.
unordered_map< const diff *, artifact_sptr_set_type, diff_hash, diff_equal > diff_artifact_set_map_type
A convenience typedef for an unordered_map which key is a diff* and which value is a artifact_sptr_se...
shared_ptr< type_or_decl_base > type_or_decl_base_sptr
A convenience typedef for a shared_ptr to type_or_decl_base.
A hashing functor for using diff_sptr and diff* in a hash map or set.
bool operator()(const function_decl::parameter_sptr &l, const function_decl::parameter_sptr &r)
Returns true iff the index of the first parameter is smaller than the of the second parameter...
Abstraction of an elf symbol.
unordered_map< string, const 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...
vector< method_decl_sptr > member_functions
Convenience typedef.
shared_ptr< var_diff > var_diff_sptr
Convenience typedef for a shared pointer to a var_diff type.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
#define ABG_ASSERT(cond)
This is a wrapper around the 'assert' glibc call. It allows for its argument to have side effects...
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
A functor to compare two enumerators based on their value. This implements the "less than" operator...
A diff node in this category has a descendant node that is in the HAS_ALLOWED_CHANGE_CATEGORY categor...
bool operator()(const function_decl::parameter &l, const function_decl::parameter &r)
Returns true iff the index of the first parameter is smaller than the of the second parameter...
A comparison functor to compare two instances of fn_parm_diff based on their indexes.
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...
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...
A comparison functor to compare two instances of var_diff that represent changed data members based o...
bool operator()(const diff_sptr &l, const diff_sptr &r) const
An operator that takes two instances of diff_sptr returns true if its first operand compares less tha...
abg_compat::optional< uint64_t > hash_t
The abstraction for an 8 bytes hash value.
This type contains maps. Each map associates a type name to a diff of that type. Not all kinds of dif...
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 t...
The private member (pimpl) for diff_context.
bool is_less_than(const decl_diff_base &first, const decl_diff_base &second)
Compare two decl diff nodes (decl_diff_base) for the purpose of sorting.
bool operator()(const function_decl_diff_sptr first, const function_decl_diff_sptr second)
The actual less than operator.
unordered_map< types_or_decls_type, diff_sptr, types_or_decls_hash, types_or_decls_equal > types_or_decls_diff_map_type
A convenience typedef for a map of types_or_decls_type and diff_sptr.
void sort_changed_data_members(changed_var_sptrs_type &input)
Sort (in place) a vector of changed data members.
shared_ptr< base_diff > base_diff_sptr
Convenience typedef for a shared pointer to a base_diff type.
void sort_changed_enumerators(const string_changed_enumerator_map &enumerators_map, changed_enumerators_type &sorted)
Sort a map of changed enumerators.
bool is_filtered_out(diff_category category)
Check if a given categorization of a diff node should make it be filtered out.
A comparison functor to compare two data members based on their offset.
shared_ptr< fn_parm_diff > fn_parm_diff_sptr
Convenience typedef for a shared pointer to a fn_parm_diff type.
string get_name(const type_or_decl_base *tod, bool qualified)
Build and return a copy of the name of an ABI artifact that is either a type or a decl...
unordered_map< string, method_decl_sptr > string_member_function_sptr_map
Convenience typedef for a hash map of strings and member functions.
bool function_decl_is_less_than(const function_decl &f, const function_decl &s)
Test if the pretty representation of a given function_decl is lexicographically less then the pretty ...
The type of private data of class_or_union_diff.
A deleter for shared pointers that ... doesn't delete the object managed by the shared pointer...
std::pair< const type_or_decl_base_sptr, const type_or_decl_base_sptr > types_or_decls_type
Convenience typedef for a pair of decls or types.
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 potentia...
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 o...
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.
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.
an engine to suppress the parts of the result of comparing two sets of ABI artifacts.
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 funct...
A diff node in this category carries a change that must be reported, even if the diff node is also in...
vector< diff_sptr > diff_sptrs_type
Convenience typedef for a vector of diff_sptr.
A functor to compare two changed enumerators, based on their initial value.
shared_ptr< corpus_diff > corpus_diff_sptr
A convenience typedef for a shared pointer to corpus_diff.
weak_ptr< diff_context > diff_context_wptr
Convenience typedef for a weak pointer of diff_context.
A comparison functor for using diff_sptr and diff* in a hash map or set.
vector< base_diff_sptr > base_diff_sptrs_type
Convenience typedef for a vector of base_diff_sptr.
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 functio...
bool operator()(const diff &d1, const diff &d2) const
The function-call operator to compare two diff nodes.
"Less than" functor to compare instances of function_decl.
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.
Functor that compares two function parameters for the purpose of sorting them.
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 w...
bool operator()(const diff_sptr &d1, const diff_sptr &d2) const
The function-call operator to compare two diff nodes.
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...
size_t operator()(const diff *d) const
The function-call operator to hash a diff node.
const string & get_id_string() const
Get a string that is representative of a given elf_symbol.
vector< base_spec_sptr > base_specs
Convenience typedef.
This is a document class that aims to capture statistics about the changes carried by a corpus_diff t...
void sort_string_function_ptr_map(const string_function_ptr_map &map, vector< const function_decl * > &sorted)
Sort an instance of string_function_ptr_map map and stuff a resulting sorted vector of pointers to fu...
The type of the private data (pimpl sub-object) of the class_diff type.
The internal type for the impl idiom implementation of var_diff.
shared_ptr< diff > diff_sptr
Convenience typedef for a shared_ptr for the diff class.
shared_ptr< reporter_base > reporter_base_sptr
A convenience typedef for a shared pointer to a reporter_base.
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.
bool operator()(const function_decl_sptr f, const function_decl_sptr s)
The actual "less than" operator for instances of function_decl. It returns true if the first function...
string get_pretty_representation(diff *d)
Get a copy of the pretty representation of a diff node.
weak_ptr< diff > diff_wptr
Convenience typedef for a weak_ptr for the diff class.
A comparison functor for instances of function_decl_diff that represent changes between two virtual m...
Private data for the diff type. The details of generic view of the diff node are expressed here...
bool operator()(const decl_base_sptr &f, const decl_base_sptr &s) const
Compare two data members.