mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 16:04:34 +00:00
The Git repository of the Libabigail Project
ccdc44b3eb
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> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-GPLV3 | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.