libabigail
Classes | Public Member Functions | Friends | List of all members
diff_context Class Reference

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...

#include <abg-comparison.h>

Classes

struct  priv
 The private member (pimpl) for diff_context. More...
 

Public Member Functions

void add_diff_filter (filtering::filter_base_sptr)
 Setter for the diff filters to apply to a given diff sub-tree. More...
 
void add_suppression (const suppr::suppression_sptr suppr)
 Add a new suppression specification that specifies which diff node reports should be dropped on the floor. More...
 
void add_suppressions (const suppr::suppressions_type &supprs)
 Add new suppression specifications that specify which diff node reports should be dropped on the floor. More...
 
void clear_last_diffs_visited_per_class_of_equivalence ()
 
ostream * default_output_stream ()
 Getter for the default output stream used by code of the comparison engine. By default the default output stream is a NULL pointer. More...
 
void default_output_stream (ostream *)
 Setter for the default output stream used by code of the comparison engine. By default the default output stream is a NULL pointer. More...
 
const filtering::filtersdiff_filters () const
 Getter for the diff tree nodes filters to apply to diff sub-trees. More...
 
diffdiff_has_been_visited (const diff *) const
 Test if a diff node has been traversed. More...
 
diff_sptr diff_has_been_visited (const diff_sptr) const
 Test if a diff node has been traversed. More...
 
const suppr::suppressions_typedirect_suppressions () const
 Getter of the direct suppression specification (those that are not negated) comprised in the general vector of suppression specifications returned by diff_context::suppression(). More...
 
void do_dump_diff_tree (const corpus_diff_sptr) const
 Emit a textual representation of a corpus_diff tree to the error output stream of the current context, for debugging purposes. More...
 
void do_dump_diff_tree (const diff_sptr) const
 Emit a textual representation of a diff tree to the error output stream of the current context, for debugging purposes. More...
 
bool do_log () const
 Test if logging was requested. More...
 
void do_log (bool)
 Set logging as requested. More...
 
bool dump_diff_tree () const
 Test if the comparison engine should dump the diff tree for the changed functions and variables it has. More...
 
void dump_diff_tree (bool f)
 Set if the comparison engine should dump the diff tree for the changed functions and variables it has. More...
 
ostream * error_output_stream () const
 Getter for the errror output stream used by code of the comparison engine. By default the error output stream is a NULL pointer. More...
 
void error_output_stream (ostream *)
 Setter for the errror output stream used by code of the comparison engine. By default the error output stream is a NULL pointer. More...
 
void forbid_visiting_a_node_twice (bool f)
 This sets a flag that, if it's true, then during the traversing of a diff nodes tree each node is visited at most once. More...
 
void forbid_visiting_a_node_twice_per_interface (bool)
 This function sets a flag os that if forbid_visiting_a_node_twice() returns true, then each time the node visitor starts visiting a new interface, it resets the memory the systems has about already visited node. More...
 
void forget_visited_diffs ()
 Unmark all the diff nodes that were marked as being traversed. More...
 
diff_category get_allowed_category () const
 Getter for the bitmap that represents the set of categories that the user wants to see reported. More...
 
diff_sptr get_canonical_diff_for (const diff_sptr d) const
 Getter for the canonical diff node for the diff represented by the two subjects of a given diff node. More...
 
diff_sptr get_canonical_diff_for (const type_or_decl_base_sptr first, const type_or_decl_base_sptr second) const
 Getter for the canonical diff node for the diff represented by their two subjects. More...
 
const corpus_diff_sptrget_corpus_diff () const
 Get the corpus diff for the current context. More...
 
corpus_sptr get_first_corpus () const
 Getter for the first corpus of the corpus diff of the current context. More...
 
const diffget_last_visited_diff_of_class_of_equivalence (const diff *)
 
reporter_base_sptr get_reporter () const
 Getter of the reporter to be used in this context. More...
 
corpus_sptr get_second_corpus () const
 Getter for the second corpus of the corpus diff of the current context. More...
 
void initialize_canonical_diff (const diff_sptr diff)
 Set the canonical diff node property of a given diff node appropriately. More...
 
void keep_diff_alive (diff_sptr &)
 Add a diff node to the set of diff nodes that are kept alive for the life time of the current instance of diff_context. More...
 
void mark_diff_as_visited (const diff *)
 Mark a diff node as traversed by a traversing algorithm. More...
 
void mark_last_diff_visited_per_class_of_equivalence (const diff *)
 
void maybe_apply_filters (corpus_diff_sptr diff)
 Apply the diff filters to the diff nodes of a corpus_diff instance. More...
 
void maybe_apply_filters (diff_sptr diff)
 Apply the diff filters to a given diff sub-tree. More...
 
const suppr::suppressions_typenegated_suppressions () const
 Getter of the negated suppression specifications that are comprised in the general vector of suppression specifications returned by diff_context::suppressions(). More...
 
bool perform_change_categorization () const
 Test if it's requested to perform diff node categorization. More...
 
void perform_change_categorization (bool)
 Request change categorization or not. More...
 
void set_allowed_category (diff_category c)
 Setter for the bitmap that represents the set of categories that the user wants to see reported. More...
 
void set_corpus_diff (const corpus_diff_sptr &)
 Set the corpus diff relevant to this context. More...
 
void set_reporter (reporter_base_sptr &)
 Setter of the reporter to be used in this context. More...
 
bool show_added_fns () const
 
void show_added_fns (bool f)
 Set a flag saying to show the added functions. More...
 
bool show_added_symbols_unreferenced_by_debug_info () const
 Getter for the flag that indicates if symbols not referenced by any debug info and that got added are to be reported about. More...
 
void show_added_symbols_unreferenced_by_debug_info (bool f)
 Setter for the flag that indicates if symbols not referenced by any debug info and that got added are to be reported about. More...
 
bool show_added_vars () const
 
void show_added_vars (bool f)
 Set a flag saying to show the added variables. More...
 
bool show_architecture_change () const
 Getter for the property that says if the comparison module should show the architecture changes in its report. More...
 
void show_architecture_change (bool f)
 Setter for the property that says if the comparison module should show the architecture changes in its report. More...
 
bool show_changed_fns () const
 
void show_changed_fns (bool f)
 Set a flag saying to show the changed functions. More...
 
bool show_changed_vars () const
 
void show_changed_vars (bool f)
 Set a flag saying to show the changed variables. More...
 
bool show_deleted_fns () const
 
void show_deleted_fns (bool f)
 Set a flag saying to show the deleted functions. More...
 
bool show_deleted_vars () const
 
void show_deleted_vars (bool f)
 Set a flag saying to show the deleted variables. More...
 
bool show_hex_values () const
 Get the flag that indicates if the diff reports using this context should show sizes and offsets in an hexadecimal base or not. If not, then they are to be shown in a decimal base. More...
 
void show_hex_values (bool f)
 Set the flag that indicates if diff reports using this context should show sizes and offsets in an hexadecimal base or not. If not, then they are to be shown in a decimal base. More...
 
bool show_impacted_interfaces () const
 Getter of the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not. More...
 
void show_impacted_interfaces (bool f)
 Setter of the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not. More...
 
bool show_leaf_changes_only () const
 Get the flag that indicates if the diff using this context should show only leaf changes or not. More...
 
void show_leaf_changes_only (bool f)
 Set the flag that indicates if the diff using this context should show only leaf changes or not. More...
 
bool show_linkage_names () const
 
void show_linkage_names (bool f)
 
bool show_locs () const
 
void show_locs (bool f)
 Set a flag saying to show location information. More...
 
bool show_offsets_sizes_in_bits () const
 Get the flag that indicates if diff reports using this context should show sizes and offsets in bits, rather than bytes. More...
 
void show_offsets_sizes_in_bits (bool f)
 Set the flag that indicates if diff reports using this context should show sizes and offsets in bits, rather than bytes. More...
 
bool show_redundant_changes () const
 A getter for the flag that says if we should report about functions or variables diff nodes that have *exclusively* redundant diff tree children nodes. More...
 
void show_redundant_changes (bool f)
 A setter for the flag that says if we should report about functions or variables diff nodes that have *exclusively* redundant diff tree children nodes. More...
 
void show_relative_offset_changes (bool f)
 Set a flag saying if offset changes should be reported in a relative way. That is, if the report should say how of many bits a class/struct data member did move. More...
 
bool show_relative_offset_changes (void)
 Get the flag saying if offset changes should be reported in a relative way. That is, if the report should say how of many bits a class/struct data member did move. More...
 
bool show_soname_change () const
 Getter for the property that says if the comparison module should show the soname changes in its report. More...
 
void show_soname_change (bool f)
 Setter for the property that says if the comparison module should show the soname changes in its report. More...
 
bool show_stats_only () const
 Test if the comparison module should only show the diff stats. More...
 
void show_stats_only (bool f)
 Set a flag saying if the comparison module should only show the diff stats. More...
 
bool show_symbols_unreferenced_by_debug_info () const
 Getter for the flag that indicates if symbols not referenced by any debug info are to be compared and reported about. More...
 
void show_symbols_unreferenced_by_debug_info (bool f)
 Setter for the flag that indicates if symbols not referenced by any debug info are to be compared and reported about. More...
 
bool show_unreachable_types ()
 Getter for the flag that indicates if changes on types unreachable from global functions and variables are to be reported. More...
 
void show_unreachable_types (bool f)
 Setter for the flag that indicates if changes on types unreachable from global functions and variables are to be reported. More...
 
suppr::suppressions_typesuppressions ()
 Getter for the vector of suppressions that specify which diff node reports should be dropped on the floor. More...
 
const suppr::suppressions_typesuppressions () const
 Getter for the vector of suppressions that specify which diff node reports should be dropped on the floor. More...
 
void switch_categories_off (diff_category c)
 Setter for the bitmap that represents the set of categories that the user wants to see reported. More...
 
void switch_categories_on (diff_category c)
 Setter for the bitmap that represents the set of categories that the user wants to see reported. More...
 
bool visiting_a_node_twice_is_forbidden () const
 Return a flag that, if true, then during the traversing of a diff nodes tree each node is visited at most once. More...
 
bool visiting_a_node_twice_is_forbidden_per_interface () const
 Return a flag that, if true, then during the traversing of a diff nodes tree each node is visited at most once, while visiting the diff tree underneath a given interface (public function or variable). Each time a new interface is visited, the nodes visited while visiting previous interfaces can be visited again. More...
 

Friends

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...
 

Detailed Description

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.

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

Constructor & Destructor Documentation

◆ diff_context()

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

Member Function Documentation

◆ add_diff_filter()

void add_diff_filter ( filtering::filter_base_sptr  f)

Setter for the diff filters to apply to a given diff sub-tree.

Parameters
fthe new diff filter to add to the vector of diff filters to apply to diff sub-trees.

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

◆ add_suppression()

void add_suppression ( const suppr::suppression_sptr  suppr)

Add a new suppression specification that specifies which diff node reports should be dropped on the floor.

Parameters
supprthe new suppression specification to add to the existing set of suppressions specifications of the diff context.

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

◆ add_suppressions()

void add_suppressions ( const suppr::suppressions_type supprs)

Add new suppression specifications that specify which diff node reports should be dropped on the floor.

Parameters
supprsthe new suppression specifications to add to the existing set of suppression specifications of the diff context.

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

◆ default_output_stream() [1/2]

ostream * default_output_stream ( )

Getter for the default output stream used by code of the comparison engine. By default the default output stream is a NULL pointer.

Returns
a pointer to the default output stream.

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

◆ default_output_stream() [2/2]

void default_output_stream ( ostream *  o)

Setter for the default output stream used by code of the comparison engine. By default the default output stream is a NULL pointer.

Parameters
oa pointer to the default output stream.

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

◆ diff_filters()

const filtering::filters & diff_filters ( ) const

Getter for the diff tree nodes filters to apply to diff sub-trees.

Returns
the vector of tree filters to apply to diff sub-trees.

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

◆ diff_has_been_visited() [1/2]

diff * diff_has_been_visited ( const diff d) const

Test if a diff node has been traversed.

Parameters
dthe diff node to consider.
Returns
the first diff node against which d is redundant.

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

◆ diff_has_been_visited() [2/2]

diff_sptr diff_has_been_visited ( const diff_sptr  d) const

Test if a diff node has been traversed.

Parameters
dthe diff node to consider.
Returns
the first diff node against which d is redundant.

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

◆ direct_suppressions()

const suppr::suppressions_type & direct_suppressions ( ) const

Getter of the direct suppression specification (those that are not negated) comprised in the general vector of suppression specifications returned by diff_context::suppression().

Note that the first invocation of this function scans the vector returned by diff_context::suppressions() and caches the direct suppressions from there.

Subsequent invocations of this function just return the cached direct suppressions.

Returns
the direct suppression specifications.

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

◆ do_dump_diff_tree() [1/2]

void do_dump_diff_tree ( const corpus_diff_sptr  d) const

Emit a textual representation of a corpus_diff tree to the error output stream of the current context, for debugging purposes.

Parameters
dthe corpus_diff tree to serialize to the error output associated to the current instance of diff_context.

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

◆ do_dump_diff_tree() [2/2]

void do_dump_diff_tree ( const diff_sptr  d) const

Emit a textual representation of a diff tree to the error output stream of the current context, for debugging purposes.

Parameters
dthe diff tree to serialize to the error output associated to the current instance of diff_context.

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

◆ do_log() [1/2]

bool do_log ( ) const

Test if logging was requested.

Returns
true iff logging was requested.

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

◆ do_log() [2/2]

void do_log ( bool  f)

Set logging as requested.

Parameters
fthe flag

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

◆ dump_diff_tree() [1/2]

bool dump_diff_tree ( ) const

Test if the comparison engine should dump the diff tree for the changed functions and variables it has.

Returns
true if after the comparison, the engine should dump the diff tree for the changed functions and variables it has.

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

◆ dump_diff_tree() [2/2]

void dump_diff_tree ( bool  f)

Set if the comparison engine should dump the diff tree for the changed functions and variables it has.

Parameters
ftrue if after the comparison, the engine should dump the diff tree for the changed functions and variables it has.

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

◆ error_output_stream() [1/2]

ostream * error_output_stream ( ) const

Getter for the errror output stream used by code of the comparison engine. By default the error output stream is a NULL pointer.

Returns
a pointer to the error output stream.

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

◆ error_output_stream() [2/2]

void error_output_stream ( ostream *  o)

Setter for the errror output stream used by code of the comparison engine. By default the error output stream is a NULL pointer.

Parameters
oa pointer to the error output stream.

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

◆ forbid_visiting_a_node_twice()

void forbid_visiting_a_node_twice ( bool  f)

This sets a flag that, if it's true, then during the traversing of a diff nodes tree each node is visited at most once.

Parameters
fif true then during the traversing of a diff nodes tree each node is visited at most once.

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

◆ forbid_visiting_a_node_twice_per_interface()

void forbid_visiting_a_node_twice_per_interface ( bool  f)

This function sets a flag os that if forbid_visiting_a_node_twice() returns true, then each time the node visitor starts visiting a new interface, it resets the memory the systems has about already visited node.

Parameters
fthe flag to set.

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

◆ forget_visited_diffs()

void forget_visited_diffs ( )

Unmark all the diff nodes that were marked as being traversed.

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

◆ get_allowed_category()

diff_category get_allowed_category ( ) const

Getter for the bitmap that represents the set of categories that the user wants to see reported.

Returns
a bitmap that represents the set of categories that the user wants to see reported.

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

◆ get_canonical_diff_for() [1/2]

diff_sptr get_canonical_diff_for ( const diff_sptr  d) const

Getter for the canonical diff node for the diff represented by the two subjects of a given diff node.

Parameters
dthe diff node to get the canonical node for.
Returns
the canonical diff for the diff node represented by the two diff subjects of d. If no canonical diff node was registered for these subjects, then a nil node is returned.

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

◆ get_canonical_diff_for() [2/2]

diff_sptr get_canonical_diff_for ( const type_or_decl_base_sptr  first,
const type_or_decl_base_sptr  second 
) const

Getter for the canonical diff node for the diff represented by their two subjects.

Parameters
firstthe first subject of the diff.
secondthe second subject of the diff.
Returns
the canonical diff for the diff node represented by the two diff subjects first and second. If no canonical diff node was registered for these subjects, then a nil node is returned.

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

◆ get_corpus_diff()

const corpus_diff_sptr & get_corpus_diff ( ) const

Get the corpus diff for the current context.

Returns
the corpus diff of this context.

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

◆ get_first_corpus()

corpus_sptr get_first_corpus ( ) const

Getter for the first corpus of the corpus diff of the current context.

Returns
the first corpus of the corpus diff of the current context, if no corpus diff is associated to the context.

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

◆ get_reporter()

reporter_base_sptr get_reporter ( ) const

Getter of the reporter to be used in this context.

Returns
the reporter to be used in this context.

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

◆ get_second_corpus()

corpus_sptr get_second_corpus ( ) const

Getter for the second corpus of the corpus diff of the current context.

Returns
the second corpus of the corpus diff of the current context, if no corpus diff is associated to the context.

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

◆ initialize_canonical_diff()

void initialize_canonical_diff ( const diff_sptr  diff)

Set the canonical diff node property of a given diff node appropriately.

For a given diff node that has no canonical diff node, retrieve the canonical diff node (by looking at its diff subjects and at the current context) and set the canonical diff node property of the diff node to that canonical diff node. If no canonical diff node has been registered to the diff context for the subjects of the diff node then, register the canonical diff node as being the diff node itself; and set its canonical diff node property as such. Otherwise, if the diff node already has a canonical diff node, do nothing.

Parameters
diffthe diff node to initialize the canonical diff node property for.

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

◆ keep_diff_alive()

void keep_diff_alive ( diff_sptr d)

Add a diff node to the set of diff nodes that are kept alive for the life time of the current instance of diff_context.

Note that diff added to the diff cache are kept alive as well, and don't need to be passed to this function to be kept alive.

Parameters
dthe diff node to be kept alive during the life time of the current instance of diff_context.

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

◆ mark_diff_as_visited()

void mark_diff_as_visited ( const diff d)

Mark a diff node as traversed by a traversing algorithm.

Actually, it's the canonical diff of this node that is marked as traversed.

Subsequent invocations of diff_has_been_visited() on the diff node will yield true.

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

◆ maybe_apply_filters() [1/2]

void maybe_apply_filters ( corpus_diff_sptr  diff)

Apply the diff filters to the diff nodes of a corpus_diff instance.

If the current context is instructed to filter out some categories then this function walks the diff tree and categorizes its nodes by using the filters held by the context.

Parameters
diffthe corpus diff to apply the filters to.

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

◆ maybe_apply_filters() [2/2]

void maybe_apply_filters ( diff_sptr  diff)

Apply the diff filters to a given diff sub-tree.

If the current context is instructed to filter out some categories then this function walks the given sub-tree and categorizes its nodes by using the filters held by the context.

Parameters
diffthe diff sub-tree to apply the filters to.

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

◆ negated_suppressions()

const suppr::suppressions_type & negated_suppressions ( ) const

Getter of the negated suppression specifications that are comprised in the general vector of suppression specifications returned by diff_context::suppressions().

Note that the first invocation of this function scans the vector returned by diff_context::suppressions() and caches the negated suppressions from there.

Subsequent invocations of this function just return the cached negated suppressions.

Returns
the negated suppression specifications stored in this diff context.

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

◆ perform_change_categorization() [1/2]

bool perform_change_categorization ( ) const

Test if it's requested to perform diff node categorization.

Returns
true iff it's requested to perform diff node categorization.

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

◆ perform_change_categorization() [2/2]

void perform_change_categorization ( bool  f)

Request change categorization or not.

Parameters
ftrue iff change categorization is requested.

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

◆ set_allowed_category()

void set_allowed_category ( diff_category  c)

Setter for the bitmap that represents the set of categories that the user wants to see reported.

Parameters
ca bitmap that represents the set of categories that the user wants to see represented.

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

◆ set_corpus_diff()

void set_corpus_diff ( const corpus_diff_sptr d)

Set the corpus diff relevant to this context.

Parameters
dthe corpus_diff we are interested in.

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

◆ set_reporter()

void set_reporter ( reporter_base_sptr r)

Setter of the reporter to be used in this context.

Parameters
rthe reporter to be used in this context.

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

◆ show_added_fns() [1/2]

bool show_added_fns ( ) const
Returns
true if we want to show the added functions, false otherwise.

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

◆ show_added_fns() [2/2]

void show_added_fns ( bool  f)

Set a flag saying to show the added functions.

Parameters
ftrue to show the added functions.

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

◆ show_added_symbols_unreferenced_by_debug_info() [1/2]

bool show_added_symbols_unreferenced_by_debug_info ( ) const

Getter for the flag that indicates if symbols not referenced by any debug info and that got added are to be reported about.

Returns
true iff symbols not referenced by any debug info and that got added are to be reported about.

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

◆ show_added_symbols_unreferenced_by_debug_info() [2/2]

void show_added_symbols_unreferenced_by_debug_info ( bool  f)

Setter for the flag that indicates if symbols not referenced by any debug info and that got added are to be reported about.

Parameters
fthe new flag that says if symbols not referenced by any debug info and that got added are to be reported about.

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

◆ show_added_vars() [1/2]

bool show_added_vars ( ) const
Returns
true if we want to show the added variables, false otherwise.

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

◆ show_added_vars() [2/2]

void show_added_vars ( bool  f)

Set a flag saying to show the added variables.

Parameters
ftrue to show the added variables.

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

◆ show_architecture_change() [1/2]

bool show_architecture_change ( ) const

Getter for the property that says if the comparison module should show the architecture changes in its report.

Returns
the value of the property.

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

◆ show_architecture_change() [2/2]

void show_architecture_change ( bool  f)

Setter for the property that says if the comparison module should show the architecture changes in its report.

Parameters
fthe new value of the property.

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

◆ show_changed_fns() [1/2]

bool show_changed_fns ( ) const
Returns
true if we want to show the changed functions, false otherwise.

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

◆ show_changed_fns() [2/2]

void show_changed_fns ( bool  f)

Set a flag saying to show the changed functions.

Parameters
ftrue to show the changed functions.

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

◆ show_changed_vars() [1/2]

bool show_changed_vars ( ) const
Returns
true if we want to show the changed variables, false otherwise.

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

◆ show_changed_vars() [2/2]

void show_changed_vars ( bool  f)

Set a flag saying to show the changed variables.

Parameters
ftrue to show the changed variables.

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

◆ show_deleted_fns() [1/2]

bool show_deleted_fns ( ) const
Returns
true if we want to show the deleted functions, false otherwise.

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

◆ show_deleted_fns() [2/2]

void show_deleted_fns ( bool  f)

Set a flag saying to show the deleted functions.

Parameters
ftrue to show deleted functions.

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

◆ show_deleted_vars() [1/2]

bool show_deleted_vars ( ) const
Returns
true if we want to show the deleted variables, false otherwise.

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

◆ show_deleted_vars() [2/2]

void show_deleted_vars ( bool  f)

Set a flag saying to show the deleted variables.

Parameters
ftrue to show the deleted variables.

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

◆ show_hex_values() [1/2]

bool show_hex_values ( ) const

Get the flag that indicates if the diff reports using this context should show sizes and offsets in an hexadecimal base or not. If not, then they are to be shown in a decimal base.

Returns
true iff sizes and offsets are to be shown in an hexadecimal base.

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

◆ show_hex_values() [2/2]

void show_hex_values ( bool  f)

Set the flag that indicates if diff reports using this context should show sizes and offsets in an hexadecimal base or not. If not, then they are to be shown in a decimal base.

Parameters
fif true then sizes and offsets are to be shown in an hexadecimal base.

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

◆ show_impacted_interfaces() [1/2]

bool show_impacted_interfaces ( ) const

Getter of the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not.

Returns
the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not.

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

◆ show_impacted_interfaces() [2/2]

void show_impacted_interfaces ( bool  f)

Setter of the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not.

Parameters
fthe new value of the flag that indicates if the leaf reporter should display a summary of the interfaces impacted by a given leaf change or not.

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

◆ show_leaf_changes_only() [1/2]

bool show_leaf_changes_only ( ) const

Get the flag that indicates if the diff using this context should show only leaf changes or not.

Returns
the value of the flag that indicates if the diff using this context should show only leaf changes or not.

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

◆ show_leaf_changes_only() [2/2]

void show_leaf_changes_only ( bool  f)

Set the flag that indicates if the diff using this context should show only leaf changes or not.

Parameters
fthe new value of the flag that indicates if the diff using this context should show only leaf changes or not.

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

◆ show_linkage_names() [1/2]

bool show_linkage_names ( ) const

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

◆ show_linkage_names() [2/2]

void show_linkage_names ( bool  f)

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

◆ show_locs() [1/2]

bool show_locs ( ) const
Returns
true if we want to show location information, false otherwise.

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

◆ show_locs() [2/2]

void show_locs ( bool  f)

Set a flag saying to show location information.

Parameters
ftrue to show location information.

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

◆ show_offsets_sizes_in_bits() [1/2]

bool show_offsets_sizes_in_bits ( ) const

Get the flag that indicates if diff reports using this context should show sizes and offsets in bits, rather than bytes.

Returns
true iff sizes and offsets are to be shown in bits. Otherwise they are to be shown in bytes.

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

◆ show_offsets_sizes_in_bits() [2/2]

void show_offsets_sizes_in_bits ( bool  f)

Set the flag that indicates if diff reports using this context should show sizes and offsets in bits, rather than bytes.

Parameters
fif true then sizes and offsets are to be shown in bits. Otherwise they are to be shown in bytes.

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

◆ show_redundant_changes() [1/2]

bool show_redundant_changes ( ) const

A getter for the flag that says if we should report about functions or variables diff nodes that have *exclusively* redundant diff tree children nodes.

Returns
the flag.

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

◆ show_redundant_changes() [2/2]

void show_redundant_changes ( bool  f)

A setter for the flag that says if we should report about functions or variables diff nodes that have *exclusively* redundant diff tree children nodes.

Parameters
fthe flag to set.

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

◆ show_relative_offset_changes() [1/2]

void show_relative_offset_changes ( bool  f)

Set a flag saying if offset changes should be reported in a relative way. That is, if the report should say how of many bits a class/struct data member did move.

Parameters
fthe new boolean value of the flag.

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

◆ show_relative_offset_changes() [2/2]

bool show_relative_offset_changes ( void  )

Get the flag saying if offset changes should be reported in a relative way. That is, if the report should say how of many bits a class/struct data member did move.

Returns
the boolean value of the flag.

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

◆ show_soname_change() [1/2]

bool show_soname_change ( ) const

Getter for the property that says if the comparison module should show the soname changes in its report.

Returns
the value of the property.

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

◆ show_soname_change() [2/2]

void show_soname_change ( bool  f)

Setter for the property that says if the comparison module should show the soname changes in its report.

Parameters
fthe new value of the property.

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

◆ show_stats_only() [1/2]

bool show_stats_only ( ) const

Test if the comparison module should only show the diff stats.

Returns
true if the comparison module should only show the diff stats, false otherwise.

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

◆ show_stats_only() [2/2]

void show_stats_only ( bool  f)

Set a flag saying if the comparison module should only show the diff stats.

Parameters
fthe flag to set.

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

◆ show_symbols_unreferenced_by_debug_info() [1/2]

bool show_symbols_unreferenced_by_debug_info ( ) const

Getter for the flag that indicates if symbols not referenced by any debug info are to be compared and reported about.

Returns
the boolean flag.

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

◆ show_symbols_unreferenced_by_debug_info() [2/2]

void show_symbols_unreferenced_by_debug_info ( bool  f)

Setter for the flag that indicates if symbols not referenced by any debug info are to be compared and reported about.

Parameters
fthe new flag to set.

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

◆ show_unreachable_types() [1/2]

bool show_unreachable_types ( )

Getter for the flag that indicates if changes on types unreachable from global functions and variables are to be reported.

Returns
true iff changes on types unreachable from global functions and variables are to be reported.

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

◆ show_unreachable_types() [2/2]

void show_unreachable_types ( bool  f)

Setter for the flag that indicates if changes on types unreachable from global functions and variables are to be reported.

Parameters
fif true, then changes on types unreachable from global functions and variables are to be reported.

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

◆ suppressions() [1/2]

suppr::suppressions_type & suppressions ( )

Getter for the vector of suppressions that specify which diff node reports should be dropped on the floor.

Returns
the set of suppressions.

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

◆ suppressions() [2/2]

const suppressions_type & suppressions ( ) const

Getter for the vector of suppressions that specify which diff node reports should be dropped on the floor.

Returns
the set of suppressions.

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

◆ switch_categories_off()

void switch_categories_off ( diff_category  c)

Setter for the bitmap that represents the set of categories that the user wants to see reported.

This function actually unsets bits from the current categories.

Parameters
ca bitmap that represents the set of categories to unset from the current categories.

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

◆ switch_categories_on()

void switch_categories_on ( diff_category  c)

Setter for the bitmap that represents the set of categories that the user wants to see reported.

This function perform a bitwise or between the new set of categories and the current ones, and then sets the current categories to the result of the or.

Parameters
ca bitmap that represents the set of categories that the user wants to see represented.

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

◆ visiting_a_node_twice_is_forbidden()

bool visiting_a_node_twice_is_forbidden ( ) const

Return a flag that, if true, then during the traversing of a diff nodes tree each node is visited at most once.

Returns
the boolean flag.

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

◆ visiting_a_node_twice_is_forbidden_per_interface()

bool visiting_a_node_twice_is_forbidden_per_interface ( ) const

Return a flag that, if true, then during the traversing of a diff nodes tree each node is visited at most once, while visiting the diff tree underneath a given interface (public function or variable). Each time a new interface is visited, the nodes visited while visiting previous interfaces can be visited again.

Returns
the boolean flag.
the boolean flag.

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

Friends And Related Function Documentation

◆ compute_diff

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

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 6631 of file abg-comparison.cc.


The documentation for this class was generated from the following files: