2020-05-29 14:26:04 +00:00
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
// -*- mode: C++ -*-
|
|
|
|
//
|
2020-02-21 15:42:35 +00:00
|
|
|
// Copyright (C) 2013-2020 Red Hat, Inc.
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
|
|
|
|
/// @file
|
|
|
|
///
|
2020-12-14 23:08:51 +00:00
|
|
|
/// Utilities to ease the wrapping of C types into std::shared_ptr
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
|
|
|
|
#ifndef __ABG_SPTR_UTILS_H__
|
|
|
|
#define __ABG_SPTR_UTILS_H__
|
|
|
|
|
|
|
|
#include <regex.h>
|
2020-12-14 23:08:53 +00:00
|
|
|
#include <memory>
|
2020-04-24 09:21:13 +00:00
|
|
|
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
|
|
|
|
namespace abigail
|
|
|
|
{
|
|
|
|
|
2020-12-14 23:08:51 +00:00
|
|
|
/// Namespace for the utilities to wrap C types into std::shared_ptr.
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
namespace sptr_utils
|
|
|
|
{
|
|
|
|
|
2020-12-14 23:08:53 +00:00
|
|
|
using std::shared_ptr;
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
|
|
|
|
/// This is to be specialized for the diverse C types that needs
|
|
|
|
/// wrapping in shared_ptr.
|
|
|
|
///
|
|
|
|
/// @tparam T the type of the C type to wrap in a shared_ptr.
|
|
|
|
///
|
|
|
|
/// @param p a pointer to wrap in a shared_ptr.
|
|
|
|
///
|
2016-05-21 01:53:03 +00:00
|
|
|
/// @return then newly created shared_ptr<T>
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
template<class T>
|
|
|
|
shared_ptr<T>
|
|
|
|
build_sptr(T* p);
|
|
|
|
|
2016-05-21 01:53:03 +00:00
|
|
|
/// This is to be specialized for the diverse C types that needs
|
|
|
|
/// wrapping in shared_ptr.
|
|
|
|
///
|
|
|
|
/// This variant creates a pointer to T and wraps it into a
|
|
|
|
/// shared_ptr<T>.
|
|
|
|
///
|
|
|
|
/// @tparam T the type of the C type to wrap in a shared_ptr.
|
|
|
|
///
|
|
|
|
/// @return then newly created shared_ptr<T>
|
|
|
|
template<class T>
|
|
|
|
shared_ptr<T>
|
|
|
|
build_sptr();
|
|
|
|
|
2014-09-30 16:04:14 +00:00
|
|
|
/// A deleter for shared pointers that ... doesn't delete the object
|
|
|
|
/// managed by the shared pointer.
|
|
|
|
struct noop_deleter
|
|
|
|
{
|
|
|
|
template<typename T>
|
|
|
|
void
|
|
|
|
operator()(const T*)
|
|
|
|
{}
|
|
|
|
};
|
Setup per-corpus type maps indexed by type names
This patch creates per-corpus maps that associate, for a certain kind
of type, the fully qualified name of the type to the type.
So there is a map for class_decl, one for enum_type_decl, one for
type_decl, etc.
These maps are populated when a new type is added to its scope.
The patch defines overloads of the function
maybe_update_types_lookup_map() that update the right map, depending
on the kind of type we are looking at.
Note that there also is a map in each class that associates a
signature string to a member functions. This is so that member
functions of a given class can be looked up by signature.
This is so that looking up a type becomes now much faster than having
to walk all the translation units of a corpus to find one.
Note that this patch is specifically part of the series of patches
that implements types and declarations de-duplication while reading
DWARF information.
The patch might slightly change the output of abi serialization or
comparison so it needs some adjustments of some test reference files.
That adjustment is not done here. Rather, it's done at once in
another patch of the set.
* include/abg-corpus.h (corpus::priv_): Make this public so that
functions from outside of the class can access it. These
functions are meant to be used only by code that is *inside*
libabigail.so, though.
* src/abg-corpus-priv.h: New file.
* src/abg-corpus.cc: Include the new abg-corpus-priv.h file.
(struct regex_t_deleter): Move this to abg-sptr-utils.h.
(build_sptr<regex_t>): Move the declaration of this function
template specialization to abg-sptr-utils.h and its definition to
abg-sptr-utils.cc.
(typedef regex_t_sptrs_type, typedef str_var_ptr_map_type)
(struct corpus::exported_decls_builder::priv, struct
corpus::priv): Move these declarations to the new
abg-corpus-priv.h.
(maybe_update_types_lookup_map): Define overloads of this (one per
kind of type).
(lookup_{basic, class, enum, typedef, class_or_typedef,
class_typedef_or_enum, qualified, pointer, reference, array,
function}_type): Define new functions.
* include/abg-ir.h (typedef istring_type_base_wptr_map_type)
(typedef istring_type_or_decl_base_sptr_map_type): Declare new
typedefs.
(class_decl::find_member_function_from_signature): Declare new
member function.
* src/abg-ir.cc: Include the new abg-corpus-priv.h file.
(maybe_update_types_lookup_map): Remove this initial function.
There are now new overloads in abg-corpus.cc for it.
(scope_decl::{add_member_decl, insert_member_decl}): Adjust.
(class_decl::{set_is_declaration_only, find_member_function,
add_member_function}): Adjust.
(class_decl::find_member_function_from_signature): Define new
member function.
* include/abg-sptr-utils.h (struct regex_t_deleter): Declare new
type.
(build_sptr<regex_t>): New build function template
specializations.
* src/abg-sptr-utils.cc: New file.
* src/Makefile.am: Add src/abg-sptr-utils.cc and
src/abg-corpus-priv.h to the build system.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-11-01 13:05:45 +00:00
|
|
|
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
}// end namespace sptr_utils
|
|
|
|
}// end namespace abigail
|
|
|
|
|
|
|
|
#endif //__ABG_SPTR_UTILS_H__
|