libabigail
|
Abstracts the building of the set of exported variables and functions. More...
#include <abg-corpus.h>
Classes | |
class | priv |
The type of the private data of corpus::exported_decls_builder type. More... | |
Public Member Functions | |
exported_decls_builder (functions &fns, variables &vars, strings_type &fns_suppress_regexps, strings_type &vars_suppress_regexps, strings_type &fns_keep_regexps, strings_type &vars_keep_regexps, strings_type &sym_id_of_fns_to_keep, strings_type &sym_id_of_vars_to_keep) | |
Constructor of corpus::exported_decls_builder. More... | |
functions & | exported_functions () |
Getter for the reference to the vector of exported functions. This vector is shared with with the corpus. It's where the set of exported function is ultimately stored. More... | |
const functions & | exported_functions () const |
Getter for the reference to the vector of exported functions. This vector is shared with with the corpus. It's where the set of exported function is ultimately stored. More... | |
variables & | exported_variables () |
Getter for the reference to the vector of exported variables. This vector is shared with with the corpus. It's where the set of exported variable is ultimately stored. More... | |
const variables & | exported_variables () const |
Getter for the reference to the vector of exported variables. This vector is shared with with the corpus. It's where the set of exported variable is ultimately stored. More... | |
std::unordered_set< function_decl * > * | fn_id_maps_to_several_fns (const function_decl *) |
Test if a given function ID maps to several functions in the same corpus. More... | |
bool | maybe_add_fn_to_exported_fns (function_decl *) |
Consider at all the tunables that control wether a function should be added to the set of exported function and if it fits in, add the function to that set. More... | |
bool | maybe_add_var_to_exported_vars (const var_decl *) |
Consider at all the tunables that control wether a variable should be added to the set of exported variable and if it fits in, add the variable to that set. More... | |
Public Attributes | |
std::unique_ptr< priv > | priv_ |
Friends | |
class | corpus |
Abstracts the building of the set of exported variables and functions.
Given a function or variable, this type can decide if it belongs to the list of exported functions and variables based on all the parameters needed.
Definition at line 333 of file abg-corpus.h.
exported_decls_builder | ( | functions & | fns, |
variables & | vars, | ||
strings_type & | fns_suppress_regexps, | ||
strings_type & | vars_suppress_regexps, | ||
strings_type & | fns_keep_regexps, | ||
strings_type & | vars_keep_regexps, | ||
strings_type & | sym_id_of_fns_to_keep, | ||
strings_type & | sym_id_of_vars_to_keep | ||
) |
Constructor of corpus::exported_decls_builder.
fns | a reference to the vector of exported functions. |
vars | a reference to the vector of exported variables. |
fns_suppress_regexps | the regular expressions that designate the functions to suppress from the exported functions set. |
vars_suppress_regexps | the regular expressions that designate the variables to suppress from the exported variables set. |
fns_keep_regexps | the regular expressions that designate the functions to keep in the exported functions set. |
fns_keep_regexps | the regular expressions that designate the functions to keep in the exported functions set. |
vars_keep_regexps | the regular expressions that designate the variables to keep in the exported variables set. |
sym_id_of_fns_to_keep | the IDs of the functions to keep in the exported functions set. |
sym_id_of_vars_to_keep | the IDs of the variables to keep in the exported variables set. |
Definition at line 76 of file abg-corpus.cc.
corpus::functions & exported_functions | ( | ) |
Getter for the reference to the vector of exported functions. This vector is shared with with the corpus. It's where the set of exported function is ultimately stored.
Definition at line 110 of file abg-corpus.cc.
const corpus::functions & exported_functions | ( | ) | const |
Getter for the reference to the vector of exported functions. This vector is shared with with the corpus. It's where the set of exported function is ultimately stored.
Definition at line 101 of file abg-corpus.cc.
corpus::variables & exported_variables | ( | ) |
Getter for the reference to the vector of exported variables. This vector is shared with with the corpus. It's where the set of exported variable is ultimately stored.
Definition at line 150 of file abg-corpus.cc.
const corpus::variables & exported_variables | ( | ) | const |
Getter for the reference to the vector of exported variables. This vector is shared with with the corpus. It's where the set of exported variable is ultimately stored.
Definition at line 141 of file abg-corpus.cc.
std::unordered_set< function_decl * > * fn_id_maps_to_several_fns | ( | const function_decl * | fn | ) |
Test if a given function ID maps to several functions in the same corpus.
The magic of ELF symbol aliases makes it possible for an ELF symbol alias to designate several different functions. This function tests if the ELF symbol of a given function has a aliases that designates another function or not.
fn | the function to consider. |
fn
, or nullptr if the function ID maps to just fn
. Definition at line 125 of file abg-corpus.cc.
bool maybe_add_fn_to_exported_fns | ( | function_decl * | fn | ) |
Consider at all the tunables that control wether a function should be added to the set of exported function and if it fits in, add the function to that set.
fn | the function to add the set of exported functions. |
Definition at line 162 of file abg-corpus.cc.
bool maybe_add_var_to_exported_vars | ( | const var_decl * | var | ) |
Consider at all the tunables that control wether a variable should be added to the set of exported variable and if it fits in, add the variable to that set.
fn | the variable to add the set of exported variables. |
Definition at line 192 of file abg-corpus.cc.