* include/abg-comp-filter.h (class redundant_filter): Remove this
now useless type declaration
* src/abg-comparison.cc (filtering::redundant_filter::visit):
Remove this useless member function definition.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comparison.h (changed_parms_type): New convenience
typedef.
* src/abg-comparison.cc (struct changed_parm_comp): New comparison
functor.
(sort_changed_parm_map): New sorting function.
(function_decl_diff::report): Use the new sort_changed_parm_map to
sort the diffs for function parameters by their indexes.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-comparison.cc (try_to_diff): For this to actually
select a diff kind, the two diff subject must be of type
'DiffType'.
(compute_diff_for_types, compute_diff_for_decls): Use
distinct_diff in last resort.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comp-filter.h (apply_filter): Declare new overload
that takes a corpus_diff_sptr ...
* src/abg-comp-filter.cc (apply_filter): ... and define it. On
the existing overload for diff_sptr, make sure to traverse all
diff nodes, even those that have already been traversed.
* include/abg-comparison.h (enum diff_category): Remove
NOT_REDUNDANT_CATEGORY, add REDUNDANT_CATEGORY.
(operator&=, +operator<<): Declare new operators for enum diff_category.
(diff_context::{forbid_traversing_a_node_twice,
traversing_a_node_twice_is_forbidden):
(diff_context::categorizing_redundancy): Remove this declaration.
(diff_context::maybe_apply_filters): Declare a new overload that
takes a corpus_diff_sptr. And a take a new flag that says if it
should visit all nodes including those that have already been
visited.
(diff::priv_): Make this data member protected.
(diff::{begin_traversing, is_traversing, end_traversing,
finish_diff_type, children_nodes, append_child_node,
get_pretty_representation, chain_into_hierarchy, traverse}):
Declare new member functions.
(distinct_diff::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Likewise.
(distinct_diff::traverse): Remove.
(pointer_diff::pointer_diff): Take the underlying type diff in
parameter.
(pointer_diff::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
(pointer_diff::traverse): Remove.
(reference_type_def::reference_type_def): Take the underlying type
diff in parameter.
({array_type_def, reference_type_def}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({array_type_diff, reference_type_def}::traverse): Remove.
(qualified_type_diff::qualified_type_diff): Take the underlying
type diff in parameter.
({enum_diff, qualified_type_diff, class_diff}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({enum_diff, qualified_type_diff, class_diff}::traverse): Remove.
(is_class_diff): Declare new function.
(base_diff::base_diff): Take the underlying type diff in
parameter.
({scope_diff, base_diff}::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
({scope_diff, base_diff}::traverse): Remove.
(function_decl_diff::function_decl_diff): Take the return type
diff as parameter.
({function_decl_diff, type_decl_diff}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({function_decl_diff, type_decl_diff}::traverse): Remove.
(typedef_diff::typedef_diff): Take the underlying type diff as
parameter.
(typedef::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
({typedef, translation_unit_diff}::traverse): Remove member
function.
(corpus_diff::{finish_diff_type, children_nodes,
append_child_node, changed_variables, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
(class diff_node_visitor::{visit_begin, visit_end}): Declare new
member functions.
(propagate_categories, print_diff_tree, categorizing_redundancy)
(clear_redundancy_categorization, apply_filters): New functions
and function overloads.
* src/abg-comparison.cc (TRY_PRE_VISIT, TRY_PRE_VISIT_CLASS_DIFF)
(TRY_POST_VISIT, TRY_POST_VISIT_CLASS_DIFF)
(CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
(UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE)
(TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(ENSURE_DIFF_NODE_TRAVERSED_ONCE)
(ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Remove these macros.
Hurrah.
(diff_context::priv::categorizing_redundancy_): Remove.
(diff_context::priv::forbid_traversing_a_node_twice_): Add new
data member.
(diff_context::priv::priv): Adjust.
(diff_context::{forbid_traversing_a_node_twice,
traversing_a_node_twice_is_forbidden}): Define new member
functions.
(diff_context::maybe_apply_filters): Once filters are applied (and
categories are set to the relevant diff tree nodes, run a pass
over the diff tree to propagate the categories to the relevant
diff tree parent nodes. Add an overload for corpus_diff_sptr.
(diff_context::categorizing_redundancy): Remove member function.
(diff_context::maybe_apply_filters): Define a new overload for
corpus_diff_sptr
(struct diff::priv::{finished_, traversing_, children_,
pretty_representation_}): New data members.
(diff::priv::priv): Adjust.
(diff::{begin_traversing, is_traversing, end_traversing,
finish_diff_type, children_nodes, append_child_node, traverse,
set_category, get_pretty_representation, chain_into_hierarchy}):
Define new member functions.
(diff::is_filtered_out): Do not refer to NOT_REDUNDANT_CATEGORY
anymore. Rather, use the new REDUNDANT_CATEGORY.
({distinct_diff, var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, function_decl_diff, type_decl_diff,
typedef_diff}::{get_pretty_representation, chain_into_hierarchy,
finish_diff_type}): Define new member functions.
({distinct_diff, var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, function_decl_diff, type_decl_diff,
typedef_diff, translation_unit_diff}::traverse): Remove member
functions.
(operator&=, operator<<): Define new operators for diff_category.
({function_decl_diff, typedef_diff}::priv::priv): Add a new
constructor.
(pointer_diff::{priv::priv, pointer_diff})
(reference_diff::{priv::priv, reference_diff})
(qualified_type_diff::{priv::priv, qualified_type_diff})
(enum_diff::{priv::priv, enum_diff}, base_diff::{priv::priv,
base_diff}, function_decl_diff::function_decl_diff): Take the
underlying type diff in parameter.
(compute_diff): Adjust the pointer_diff, reference_diff,
qualified_type_diff, base_diff, function_decl_diff overloads.
(class_diff::priv::{count_filtered_bases,
count_filtered_subtype_changed_dm, count_filtered_changed_dm,
count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
count_filtered_deleted_mem_fns}): Adjust for the call to
diff_context::maybe_apply_filters.
(corpus_diff::priv::{finished_, pretty_representation_}): New data
member.
(corpus_diff::priv::priv): New constructor.
(corpus_diff::priv::clear_redundancy_categorization): Define new
member function.
(corpus_diff::priv::apply_filters_and_compute_diff_stats):
Adjust for call to diff_context::maybe_apply_filters. Also, call
clear_redundancy_categorization at the end.
(corpus_diff::priv::categorize_redundant_changed_sub_nodes):
Revisit logic.
(corpus_diff::{chain_into_hierarchy, finish_diff_type,
children_nodes, append_child_node, changed_variables,
get_pretty_representation}): Define new member functions.
(corpus_diff::report): Categorize redundancy for every top level
function/variable diff.
(corpus_diff::traverse): Adjust to the new traversing interface.
(diff_node_visitor::{visit_begin, visit_end}): Define new member
functions.
(struct category_propagation_visitor, struct diff_node_printer)
(struct redundancy_marking_visitor, struct
redundancy_clearing_visitor): New diff tree node visitors.
(propagate_categories, print_diff_tree, categorize_redundancy)
(clear_redundancy_categorization, apply_filters): Define new
functions.
* tests/Makefile.am: Add the new tests/print-diff-tree.cc to the
source distribution. Build it into a tests/printdifftree binary.
* tools/abidiff.cc (print_diff_tree): Add debugging functions to
call from within the debugger. By default, this function and its
overloads are not compiled.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-comparison.cc (function_decl_diff::report): If a
function decl has no associated elf symbol, do not crash while
trying to report about its elf symbol aliases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-comparison.cc (represent): When a virtual member
function has no associated elf symbol, do not emit garbage in lieu
of the linkage name. Just emit no linkage name;
* tests/data/test-abidiff/test-struct1-report.txt: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-fwd.h (get_member_function_is_virtual): Declare new
overload for pointers.
* src/abg-ir.cc (get_member_function_is_virtual): Define it.
(function_decl::get_pretty_representation): Print virtual-ness of
the function_decl being pretty printed.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-ir.h (fixup_virtual_member_function): Declare new
function.
(class_decl): Declare fixup_virtual_member_function() as a member.
* src/abg-ir.cc (set_member_function_is_virtual): Ensure that the
member function that has seen its virtualness set is also put
correctly put in the vector of virtual member functions of its
class.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-corpus.cc (corpus::priv::build_public_decl_table): Assert
that when read from DWARF, only decls with elf symbols are part of
the public decls table.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-writer.cc (write_voffset): Emit the vtable offset of
virtual function even when the offset is zero.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-ir.cc (decl_base::decl_base(const decl_base& d)): Do
not forget to copy priv_->in_pub_sym_tab_.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-fwd.h (set_member_function_is_ctor)
(set_member_function_is_dtor, set_member_function_is_const)
(set_member_function_vtable_offset): Declare new functions.
* include/abg-ir.h (class_decl::sort_virtual_mem_fns): Declare new
member function.
(mem_fn_context_rel::{vtable_offset, is_constructor is_destructor,
is_const}): Add these setters.
(set_member_function_is_ctor, set_member_function_is_dtor)
(set_member_function_is_static, set_member_function_is_const)
(set_member_function_vtable_offset)
(set_member_function_is_virtual): Declare these new friend
function to class class_decl::method_decl.
* src/abg-dwarf-reader.cc (finish_member_function_reading): Split
this out from build_class_type_and_add_to_ir. Use the new setters
for member functions properties introduced above.
(build_class_type_and_add_to_ir): Factorize the creation of member
function by using build_ir_node_from_die. Once that function has
created the member function in a rather generic way, use the new
finish_member_function_reading to set the remaining specific
properties for member functions.
(build_function_decl): When called to read additional properties
of a function_decl, allow this to read and update the elf symbol
properties too. This is useful for building a clone of a function
that already has an elf symbol.
(build_ir_node_from_die): When building a function decl, consider
the case of a DIE that has both DW_AT_specification and
DW_AT_abstract_origin set. That is, DW_AT_abstract_origin is set,
and the origin has DW_AT_specification set. This is basically a
clone of a function that implements an interface (this happens for
destructors, for instance). In this case, really do the cloning
of the interface implementation. If the cloned function happens
to be member function, use finish_member_function_reading to read
the properties relevant to its method-ness.
* src/abg-ir.cc (set_member_function_is_ctor)
(set_member_function_is_dtor, set_member_function_is_const)
(set_member_function_vtable_offset)
(class_decl::sort_virtual_mem_fns): Define new functions.
(sort_virtual_member_functions): Define new static function.
(struct virtual_member_function_less_than): New functor.
(class_decl::add_member_function): Keep virtual member functions
vector sorted.
* data/test-read-dwarf/test1.abi: Adjust. Now, both the
cdtor specification and all the clones that implements the
different are emitted.
* data/test-read-dwarf/test2.so.abi: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Just skip functions
that have no ELF symbol.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* doc/manuals/Makefile: New file, generated by sphinx-quickstart.
* doc/manuals/abidiff.rst: New manual for abidiff.
* doc/manuals/abidw.rst: New manual for abidw.
* doc/manuals/abilint.rst: New manual for abilint.
* doc/manuals/conf.py: New configuration file generated by sphinx-quickstart.
* doc/manuals/index.rst: The root of the this documentation.
* doc/manuals/libabigail-overview.rst: The overview of libabigail.
* doc/manuals/tools.rst: The root of the tools manuals.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tools/Makefile.am: Do not install abisym. It's really there
just for testing purposes and is of almost no use for generic
users.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tests/data/test-bidiff: Rename this directory to
tests/data/test-abidiff.
* tests/test-bidiff.cc: Renamed this to tests/test-abidiff.cc.
* tools/biar.cc: Renamed to tools/abiar.cc
* tools/bidiff.cc: Renamed to tools/abidiff.cc
* tools/bidw.cc: Renamed to tools/abidw.cc
* tools/bilint.cc: Renamed to tools/abilint.cc
* tools/bisym.cc: Renamed to tools/abisym.cc
* tests/test-alt-dwarf-file.cc: Renamed references to bidw* to abidw*.
* tests/test-diff-filter.cc: Renamed references to bidiff to abidiff.
* tests/test-lookup-syms.cc: Renamed references to bisym to abisym.
* tools/Makefile.am: Adjust.
* tests/Makefile.am: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-corpus.cc
(symtab_build_visitor_type::regex_fns_suppress): use
sptr_utils::build_sptr, rather than building the shared_ptr of
regex_t by hand.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comparison.h (diff::{priv, sptr}): New types.
(diff::priv_): New member.
(diff::*): Remove all the other previous data members and
transform the inline member function definition into declarations
only.
* src/abg-comparison.cc (class diff::priv): New private data type.
(diff::*): Define the previous inline member functions as
out-of-line here.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-sptr-utils.h (build_sptr()): Rename the return type
from shared_ptr<regex_t> to regex_t_sptr.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comparison.h (NO_CHANGE_CATEGORY): Better comment
this enumerator.
* src/abg-comparison.cc (diff::is_filtered_out): Not-yet
categorized changes are not filtered out anymore.
(distinct_diff::report): Avoid extraneous new line here.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comparison.h
(diff_category::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY): New
enumerator.
(diff_category::EVERYTHING_CATEGORY): Adjust.
* include/abg-ir.h (elf_symbol::get_aliases_id_string)
(elf_symbol::does_alias, elf_symbols_alias)
(compute_aliases_for_elf_symbol): Declare new functions ...
* src/abg-ir.cc (elf_symbol::get_aliases_id_string)
(elf_symbol::does_alias, elf_symbols_alias)
(compute_aliases_for_elf_symbol): ... and define them.
(function_decl::operator==): Take in account elf symbol aliases.
* src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
Define new static functions.
(harmless_filter::visit): Categorize function name changes that
n doesn't impact underlying elf symbols (or the fact that two
symbols were aliases and are not anymore) as harmless.
* src/abg-comparison.cc (function_decl_diff::report): Properly
report function name changes, or symbol aliases changes for that
matter. Also report inline-ness declaration changes.
* src/abg-dwarf-reader.cc (die_is_declared_inline): New static
function.
(build_function_decl): Use the above.
* tools/bidiff.cc (set_diff_context_from_opts): Add
abigail::comparison::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY into the
harmless change camp.
* tests/data/test-diff-dwarf/test14-inline-report.txt: New test
input.
* tests/data/test-diff-dwarf/test14-inline-v0.o: Likewise.
* tests/data/test-diff-dwarf/test14-inline-v1.o: Likewise.
* tests/data/test-diff-dwarf/test14-inline-v0.cc: Source code for
test input.
* tests/data/test-diff-dwarf/test14-inline-v1.cc: Source code for
test input.
* tests/test-diff-dwarf.cc: Run this test harness over the new
input above.
* tests/data/test-diff-filter/test20-inline-report-0.txt: Likewise.
* tests/data/test-diff-filter/test20-inline-report-1.txt:
Likewise.
* tests/data/test-diff-filter/test20-inline-v0.o: New test input.
* tests/data/test-diff-filter/test20-inline-v1.o: New test input.
* tests/data/test-diff-filter/test20-inline-v0.cc: Source code for
test input.
* tests/data/test-diff-filter/test20-inline-v1.cc: Likewise.
* tests/test-diff-filter.cc: Run this test harness over the new
input above.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-comparison.h (changed_enumerator_type): New typedef.
(diff_category::{HARMLESS_ENUM_CHANGE_CATEGORY}): New enumerator.
* src/abg-comp-filter.cc (has_type_size_change)
(has_enumerator_insertion, has_enumerator_removal_or_change)
(has_harmful_enum_change): New functions.
(harmless_filter::visit): Categorize enumerator insertions that
don't change the size of the type into HARMLESS_ENUM_CHANGE_CATEGORY.
(harmful_filter::visit): Categorize enumerator removal or any enum
change that changes the size of the type into
SIZE_OR_OFFSET_CHANGE_CATEGORY.
* src/abg-comparison.cc (enumerator_value_comp)
(changed_enumerator_comp): New types.
(sort_enumerators, sort_changed_enumerators): New static
functions.
(enum_diff::report): Sort enum related reports by the value of the
enumerators.
* src/abg-dwarf-reader.cc (build_enum_type): Name anonymous enums
as __anonymous_enum__.
* tools/bidiff.cc (set_diff_context_from_opts): Add
abigail::comparison::HARMLESS_ENUM_CHANGE_CATEGORY into the harmless
stuff camp.
* tests/data/test-diff-dwarf/test15-enum-report.txt: New test
input.
* tests/data/test-diff-dwarf/test15-enum-v1.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-dwarf/test15-enum-v1.cc: Likewise.
* tests/data/test-diff-filter/test19-enum-report-0.txt: New test input.
* tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v1.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-filter/test19-enum-v1.cc: Likewise.
* tests/test-diff-dwarf.cc: Run this test harness on the new test
inputs above.
* tests/test-diff-filter.cc: Likewise.
* tests/Makefile.am: Add the new files above to the source distribution.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-ir.h (elf_symbol::operator==): Add a const to the
declaration ...
* src/abg-ir.cc (elf_symbol::operator==): ... and to the definition.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-comparison.cc (ChangedDataMemberComp): Rename this to
changed_data_member_comp
(sort_changed_data_members): Adjust.
(DataMemberComp): Rename this to data_member_comp.
(sort_data_members): Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/Makefile.am: -L and -l ought to be in LIBADD/LDADD because
that is the only place guaranteed to be in the right spot. So add
Them to libabigail_la_LIBADD.
* tools/Makefile.am: Likewise.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* configure.ac: Check for the existence of libelf at configure
time by looking at the presence of the elf_end symbol. Add the
libelf to the link command line.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* doc/Makefile.am: Do not use @docdir@. It's indeed replaced at
configure time. But there is no need for this limitation with
automake, as $(docdir) is available and replaceable anytime.
* src/Makefile.am: Likewise for @DEPS_LIBS@ and @DEPS_CFLAGS@.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* configure.ac(DEVEL_CFLAGS, DEVEL_CXXFLAGS): Remove these
useless variables.
(CFLAGS, CXXFLAGS): Set these variables directly.
* include/Makefile.am (pkginclude_HEADERS): Use this predefined
variable.
(publicheaders_DATA, publicheadersdir): Remove these.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* ChangeLog: Remove this empty file for now. It'll be added back
right before the first release by automatic generation from the
commit logs.
* INSTALL: Remove this empty file for now.
* NEWS: Remove this empty file for now. It'll be added back right
before the first release.
* configure.ac (AM_INIT_AUTOMAKE): As the mandatory but empty
files above are being removed for now, let's put in the 'foreign'
mode of automake for the moment. We'll likely remove it at
release time.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* configure.ac(AM_INIT_AUTOMAKE): Set the subdir-object option
here ..
* src/Makefile.am: ... not here.
* tests/Makefile.am: Likewise.
* tools/Makefile.am: Likewise.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* include/abg-fwd.h (std::tr1::weak_ptr): Inject this type in the
abigail namespace.
* include/abg-ir.h: Write a memory management guideline for the IR
artifacts.
(Type_base_wptr, function_type_wptr)
(class_decl_wptr): New typedefs.
(translation_unit::get_canonical_function_type): Declare new
member function.
(qualified_type_def::underlying_type_)
(reference_type_def::pointed_to_type_)
(typedef_decl::underlying_type_, function_decl::parameter::type_)
(function_type::return_type_, method_type::class_type_)
(non_type_tparameter::type_, type_composition::type_): Make this a
weak pointer.
(qualified_type_def::get_pointed_to_type)
(reference_type_def::get_pointed_to_type)
(array_type::get_element_type, typedef_decl::get_underlying_type)
(var_decl::get_type, function_decl::parameter::get_type)
(function_type::get_return_type, method_type::get_class_type)
(non_type_tparameter::get_type)
(type_composition::get_composed_type): Adjust to make this return
a shared pointer initialized with the content of the weak pointer.
(function_decl::function_decl, method_decl::method_decl): Remove
the overload that doesn't take a type. This is because now,
function types need to be registered to their containing
translation unit.
(struct function_type::hash): Declare here.
* src/abg-hash.cc (struct function_type::hash): Declare this in
abg-ir.h and just define the methods here.
* src/abg-ir.cc (fn_type_ptr_map): New typedef.
(translation_unit::priv::canonical_types_): Remove this unused
member.
(translation_unit::priv::canonical_function_types_): New member.
(translation_unit::get_canonical_function_type): Define this
function.
(array_type_def::priv::element_type_, var_decl::priv::type_)
(function_decl::priv::type_): Make this a weak pointer.
(qualified_type_def::get_underlying_type)
(pointer_type_def::get_pointed_to_type)
(reference_type_def::get_pointed_to_type)
(array_type_def::get_element_type)
(typedef_decl::get_underlying_type, var_decl::get_type)
(function_decl::get_type): Adjust to make this return a shared
pointer initialized with the content of the weak pointer.
(qualified_type_def::build_name)
(pointer_type_def::get_qualified_name)
(reference_type_def::get_qualified_name): Adjust.
(method_type::set_class_type): Cleanup the logic.
(function_decl::priv::priv): Remove the overload that takes a bare
pointer to a type. This should not be used now that we need the
function type to registered with the translation unit.
(function_decl::function_decl): Remove the overload that doesn't
take a type. This is because now, function types need to be
registered to their containing translation unit.
* src/abg-dwarf-reader.cc (build_function_decl): Register the
function type within its translation type and use its canonical
version. This complies with the new memory management rules.
* src/abg-reader.cc (build_function_decl): Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tools/biar.cc (std::ostream): Add a using directive.
(display_usage): Make it take a string reference and an ostream
as parameters. Use the ostream argument as an output stream
instead of a hard-coded cout.
Prettify output.
(main): Call display_usage with new parameters.
* tools/bidiff.cc (display_usage): Declare it static.
Prettify output.
* tools/bidw.cc (display_usage): Prettify output.
* tools/bilint.cc (display_usage): Declare it static.
Prettify output.
* tools/bisym.cc (std::cerr): Add a using directive.
(prog_name): Rename progname into this.
(display_usage): Rename show_help into this.
Add an ostream as a parameter. Use the ostream argument
as output stream insted of a hard-coded cout.
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>