23#include <unordered_map>
96using std::unordered_map;
113 size_t operator()(
const type_base_sptr& l)
const;
120typedef unordered_set<type_base_sptr,
131 vector<type_base_sptr>& result);
151 std::unique_ptr<priv> priv_;
157 typedef std::unordered_map<string, std::vector<type_base_sptr> >
170 const type_base_sptr&
173 const type_base_sptr&
176 const type_base_sptr&
219 intern(
const string&)
const;
233#ifdef WITH_DEBUG_SELF_COMPARISON
235 set_self_comparison_debug_input(
const corpus_sptr&
corpus);
238 get_self_comparison_debug_inputs(corpus_sptr& first_corpus,
239 corpus_sptr& second_corpus);
242 self_comparison_debug_is_on(
bool);
245 self_comparison_debug_is_on()
const;
248#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
250 debug_type_canonicalization_is_on(
bool flag);
253 debug_type_canonicalization_is_on()
const;
256 debug_die_canonicalization_is_on(
bool flag);
259 debug_die_canonicalization_is_on()
const;
266#ifdef WITH_DEBUG_SELF_COMPARISON
267 const unordered_map<string, uintptr_t>&
268 get_type_id_canonical_type_map()
const;
270 unordered_map<string, uintptr_t>&
271 get_type_id_canonical_type_map();
273 const unordered_map<uintptr_t, string>&
274 get_pointer_type_id_map()
const;
276 unordered_map<uintptr_t, string>&
277 get_pointer_type_id_map();
280 get_type_id_from_pointer(uintptr_t ptr)
const;
283 get_type_id_from_type(
const type_base *ptr)
const;
286 get_canonical_type_from_type_id(
const char*)
const;
322 : value_(v), loc_manager_(m), is_artificial_(
false)
330 get_location_manager()
const
331 {
return loc_manager_;}
349 {
return is_artificial_;}
365 {is_artificial_ = f;}
372 loc_manager_(l.loc_manager_),
373 is_artificial_(l.is_artificial_)
383 loc_manager_ = l.loc_manager_;
384 is_artificial_ = l.is_artificial_;
390 : value_(), loc_manager_(), is_artificial_()
402 operator bool()
const
412 {
return value_ == other.value_;}
422 {
return value_ < other.value_;}
436 expand(std::string& path,
unsigned& line,
unsigned& column)
const;
451 std::unique_ptr<priv> priv_;
464 unsigned& line,
unsigned& column)
const;
503 return repr1 == repr2;
539 std::hash<string> do_hash;
540 return do_hash(repr);
576typedef unordered_map<interned_string, type_base_wptr, hash_interned_string>
604 std::unique_ptr<priv> priv_;
687 const vector<type_base_wptr>&
697 std::unique_ptr<priv> priv_;
741 const std::string& path,
742 char address_size = 0);
791 const vector<function_type_sptr>&
828 lookup_function_type_in_translation_unit(
const function_type& t,
835 friend type_base_sptr
854 {
return lhs->get_absolute_path() < rhs->get_absolute_path();}
904typedef std::unordered_map<string, elf_symbol_sptr>
909typedef shared_ptr<string_elf_symbol_sptr_map_type>
917typedef std::unordered_map<string, elf_symbols>
960 PROTECTED_VISIBILITY,
970 std::unique_ptr<priv> priv_;
989 elf_symbol(
const elf_symbol&);
992 operator=(
const elf_symbol& s);
997 create(
const environment& e,
1142 get_alias_with_default_symbol_version()
const;
1146 bool include_symbol_itself =
true)
const;
1197compute_aliases_for_elf_symbol(
const elf_symbol& symbol,
1199 vector<elf_symbol_sptr>& alias_set);
1205 std::unique_ptr<priv> priv_;
1217 operator const string&()
const;
1223 str(
const string& s);
1288 get_access_specifier()
const
1296 get_is_static()
const
1297 {
return is_static_;}
1300 set_is_static(
bool s)
1310 return (access_ == o.access_
1311 && is_static_ == o.is_static_);
1323 {
return !operator==(o);}
1390 ABSTRACT_TYPE_OR_DECL,
1391 ABSTRACT_DECL_BASE = 1,
1392 ABSTRACT_SCOPE_DECL = 1 << 1,
1393 GLOBAL_SCOPE_DECL = 1 << 2,
1394 NAMESPACE_DECL = 1 << 3,
1396 FUNCTION_DECL = 1 << 5,
1397 FUNCTION_PARAMETER_DECL = 1 << 6,
1398 METHOD_DECL = 1 << 7,
1399 TEMPLATE_DECL = 1 << 8,
1400 ABSTRACT_TYPE_BASE = 1 << 9,
1401 ABSTRACT_SCOPE_TYPE_DECL = 1 << 10,
1402 BASIC_TYPE = 1 << 11,
1403 SUBRANGE_TYPE = 1 << 12,
1404 QUALIFIED_TYPE = 1 << 13,
1405 POINTER_TYPE = 1 << 14,
1406 REFERENCE_TYPE = 1 << 15,
1407 POINTER_TO_MEMBER_TYPE = 1 << 16,
1408 ARRAY_TYPE = 1 << 17,
1409 ENUM_TYPE = 1 << 18,
1410 TYPEDEF_TYPE = 1 << 19,
1411 CLASS_TYPE = 1 << 20,
1412 UNION_TYPE = 1 << 21,
1413 FUNCTION_TYPE = 1 << 22,
1414 METHOD_TYPE = 1 << 23,
1443 set_hash_value(
hash_t)
const;
1449 mutable std::unique_ptr<priv> priv_;
1493 get_pretty_representation(
bool internal =
false,
1494 bool qualified_name =
true)
const = 0;
1524 template<
typename T>
1600 VISIBILITY_PROTECTED,
1626 const string& mangled_name =
"",
1627 visibility vis = VISIBILITY_DEFAULT);
1633 visibility vis = VISIBILITY_DEFAULT);
1659 bool qualified_name =
true)
const;
1663 bool internal =
false)
const;
1725 const decl_base_sptr
1731 const decl_base_sptr
1760 friend decl_base_sptr
1766 friend decl_base_sptr
1767 insert_decl_into_scope(decl_base_sptr,
1768 vector<shared_ptr<decl_base> >::iterator,
1802operator==(
const decl_base_sptr&,
const decl_base_sptr&);
1805operator!=(
const decl_base_sptr&,
const decl_base_sptr&);
1808operator==(
const type_base_sptr&,
const type_base_sptr&);
1811operator!=(
const type_base_sptr&,
const type_base_sptr&);
1826 std::unique_ptr<priv> priv_;
1840 virtual decl_base_sptr
1852 const string& name,
const location& locus,
1904 declarations::iterator before);
1929 friend decl_base_sptr
1932 friend decl_base_sptr
1934 scope_decl::declarations::iterator before,
1963 get_translation_unit()
const
1964 {
return translation_unit_;}
1992 static type_base_sptr
1993 get_canonical_type_for(type_base_sptr);
2008 friend type_base_sptr
canonicalize(type_base_sptr,
bool,
bool);
2069 operator()(
const type_base_sptr l,
const type_base_sptr r)
const
2074 if (l.get() == r.get())
2100 size_t size_in_bits,
2101 size_t alignment_in_bits,
2103 const string& mangled_name =
"",
2129 bool internal =
false)
const;
2136 bool qualified_name =
true)
const;
2161 size_t size_in_bits,
size_t alignment_in_bits,
2186 bool qualified_name =
true)
const;
2209 std::unique_ptr<priv> priv_;
2215 string build_name(
bool,
bool internal =
false)
const;
2229 CV_VOLATILE = 1 << 1,
2230 CV_RESTRICT = 1 << 2
2269 bool internal =
false)
const;
2281operator==(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2284operator!=(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2310 bool qualified =
true,
bool internal =
false);
2312qualified_type_def_sptr
2323 std::unique_ptr<priv> priv_;
2336 pointer_type_def(
const type_base_sptr& pointed_to_type,
size_t size_in_bits,
2337 size_t alignment_in_bits,
const location& locus);
2340 size_t alignment_in_bits,
const location& locus);
2357 const type_base_sptr
2389 std::unique_ptr<priv> priv_;
2403 bool lvalue,
size_t size_in_bits,
2404 size_t alignment_in_bits,
const location& locus);
2407 size_t alignment_in_bits,
const location& locus);
2425 get_pointed_to_type()
const;
2432 bool internal =
false)
const;
2439 bool qualified_name =
true)
const;
2458 std::unique_ptr<priv> priv_;
2469 const type_base_sptr& member_type,
2470 const type_base_sptr& containing_type,
2471 size_t size_in_bits,
2472 size_t alignment_in_bits,
2481 const type_base_sptr&
2484 const type_base_sptr&
2498 bool internal =
false)
const;
2521 std::unique_ptr<priv> priv_;
2547 std::unique_ptr<priv> priv_;
2564 UNSIGNED_SIGNEDNESS,
2596 const type_base_sptr& underlying_type,
2672 bool qualified_name =
true)
const;
2679 const std::vector<subrange_sptr>& subs,
2683 const std::vector<subrange_sptr>& subs,
2700 bool internal =
false)
const;
2705 const type_base_sptr
2715 get_dimension_count()
const;
2722 bool qualified_name =
true)
const;
2725 get_subrange_representation()
const;
2731 get_location()
const;
2733 const std::vector<subrange_sptr>&
2758 std::unique_ptr<priv> priv_;
2790 type_base_sptr underlying_type,
2792 const string& mangled_name =
"",
2812 bool qualified_name =
true)
const;
2846 std::unique_ptr<priv> priv_;
2854 enumerator(
const string& name, int64_t value);
2900 std::unique_ptr<priv> priv_;
2911 const type_base_sptr underlying_type,
2913 const string& mangled_name =
"",
2919 const string& mangled_name =
"",
2939 bool qualified_name =
true)
const;
2949 bool internal =
false)
const;
2969 std::unique_ptr<priv> priv_;
2976 size_t offset_in_bits,
2983 get_is_laid_out()
const;
2986 set_is_laid_out(
bool f);
2989 get_offset_in_bits()
const;
2992 set_offset_in_bits(
size_t o);
3022 std::unique_ptr<priv> priv_;
3036 type_base_sptr type,
3038 const string& mangled_name,
3045 const type_base_sptr
3077 bool qualified_name =
true)
const;
3146 bool declared_inline,
3148 const string& mangled_name,
3153 type_base_sptr fn_type,
3154 bool declared_inline,
3156 const string& mangled_name =
"",
3158 binding bind = BINDING_GLOBAL);
3162 bool qualified_name =
true)
const;
3167 const std::vector<parameter_sptr >&
3176 parameters::const_iterator
3185 const type_base_sptr
3204 get_binding()
const;
3269 return l_repr < r_repr;
3289 std::unique_ptr<priv> priv_;
3297 bool variadic_marker =
false);
3303 bool variadic_marker,
3304 bool is_artificial);
3309 bool variadic_marker =
false,
3310 bool is_artificial =
false);
3314 bool variadic_marker =
false);
3318 const type_base_sptr
3334 set_index(
unsigned i);
3337 get_variadic_marker()
const;
3350 bool internal =
false)
const;
3354 bool qualified_name =
true)
const;
3387 std::unique_ptr<priv> priv_;
3396 size_t size_in_bits,
3397 size_t alignment_in_bits);
3400 size_t size_in_bits,
3401 size_t alignment_in_bits);
3404 size_t size_in_bits,
3405 size_t alignment_in_bits);
3431 parameters::const_iterator
3434 parameters::const_iterator
3445 bool qualified_name =
true)
const;
3460 std::unique_ptr<priv> priv_;
3470 class_or_union_sptr class_type,
3471 const std::vector<function_decl::parameter_sptr>& parms,
3473 size_t size_in_bits,
3474 size_t alignment_in_bits);
3477 type_base_sptr class_type,
3478 const std::vector<function_decl::parameter_sptr>& parms,
3480 size_t size_in_bits,
3481 size_t alignment_in_bits);
3485 size_t size_in_bits,
3486 size_t alignment_in_bits);
3489 size_t size_in_bits,
3490 size_t alignment_in_bits);
3511 bool qualified_name =
true)
const;
3521 std::unique_ptr<priv> priv_;
3535 const std::list<template_parameter_sptr>&
3553 std::unique_ptr<priv> priv_;
3573 get_enclosing_template_decl()
const;
3582 std::unique_ptr<priv> priv_;
3616 std::unique_ptr<priv> priv_;
3628 type_base_sptr type,
3636 const type_base_sptr
3649 std::unique_ptr<priv> priv_;
3684 std::unique_ptr<priv> priv_;
3691 type_base_sptr composed_type);
3693 const type_base_sptr
3706 std::unique_ptr<priv> priv_;
3735 shared_ptr<function_decl>
3751 std::unique_ptr<priv> priv_;
3777 shared_ptr<class_decl>
3804 : access_(a), is_static_(is_static)
3824 {
return is_static_;}
3848 bool declared_inline,
const location& locus,
3849 const string& mangled_name =
"",
3851 binding bind = BINDING_GLOBAL);
3855 bool declared_inline,
3857 const string& mangled_name =
"",
3859 binding bind = BINDING_GLOBAL);
3861 method_decl(
const string& name, type_base_sptr type,
3862 bool declared_inline,
const location& locus,
3863 const string& mangled_name =
"",
3865 binding bind = BINDING_GLOBAL);
3877 {function_decl::set_type(fn_type);}
3922operator==(
const method_decl_sptr& l,
const method_decl_sptr& r);
3925operator!=(
const method_decl_sptr& l,
const method_decl_sptr& r);
3940 virtual decl_base_sptr
3967 size_t size_in_bits,
size_t align_in_bits,
3973 size_t size_in_bits,
size_t align_in_bits,
3977 bool is_declaration_only =
true);
4005 bool is_laid_out,
bool is_static,
4006 size_t offset_in_bits);
4029 bool is_static,
bool is_ctor,
4030 bool is_dtor,
bool is_const);
4036 size_t vtable_offset,
4037 bool is_static,
bool is_ctor,
4038 bool is_dtor,
bool is_const);
4061 const member_function_templates&
4067 const member_class_templates&
4087 friend method_decl_sptr
4088 copy_member_function(class_or_union_sptr& t,
4091 friend method_decl_sptr
4092 copy_member_function(class_or_union_sptr& t,
4093 const method_decl_sptr& m);
4113 const method_decl_sptr& f);
4120operator==(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4123operator!=(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4134 insert_member_decl(decl_base_sptr member);
4169 size_t size_in_bits,
size_t align_in_bits,
4176 size_t size_in_bits,
size_t align_in_bits,
4183 size_t size_in_bits,
size_t align_in_bits,
4187 size_t size_in_bits,
size_t align_in_bits,
4192 bool is_declaration_only =
true);
4199 bool qualified_name =
true)
const;
4275 const method_decl_sptr& f);
4316 std::unique_ptr<priv> priv_;
4327 long offset_in_bits = -1,
bool is_virtual =
false);
4330 long offset_in_bits = -1,
bool is_virtual =
false);
4381 size_t size_in_bits,
const location& locus,
4386 size_t size_in_bits,
const location& locus,
4392 size_t size_in_bits,
const location& locus,
4396 size_t size_in_bits,
const location& locus,
4400 bool is_declaration_only =
true);
4407 bool qualified_name =
true)
const;
4432 const method_decl_sptr& f);
4439operator==(
const union_decl_sptr& l,
const union_decl_sptr& r);
4442operator!=(
const union_decl_sptr& l,
const union_decl_sptr& r);
4450 ssize_t vtable_offset_in_bits_;
4451 bool is_constructor_;
4452 bool is_destructor_;
4459 vtable_offset_in_bits_(-1),
4460 is_constructor_(
false),
4461 is_destructor_(
false),
4468 vtable_offset_in_bits_(-1),
4469 is_constructor_(
false),
4470 is_destructor_(
false),
4479 size_t vtable_offset_in_bits,
4483 is_virtual_(is_virtual),
4484 vtable_offset_in_bits_(vtable_offset_in_bits),
4492 {
return is_virtual_;}
4495 is_virtual(
bool is_virtual)
4496 {is_virtual_ = is_virtual;}
4506 {
return vtable_offset_in_bits_;}
4516 {vtable_offset_in_bits_ = s;}
4526 {
return is_constructor_;}
4534 {is_constructor_ = f;}
4543 {
return is_destructor_;}
4551 {is_destructor_ = f;}
4585 const char* dm_name);
4598 bool is_constructor_;
4600 shared_ptr<function_tdecl> fn_tmpl_;
4611 bool is_constructor,
bool is_const)
4614 member_base(access, is_static), is_constructor_(is_constructor),
4615 is_const_(is_const), fn_tmpl_(f)
4619 is_constructor()
const
4620 {
return is_constructor_;}
4630 as_function_tdecl()
const
4641operator==(
const member_function_template_sptr& l,
4642 const member_function_template_sptr& r);
4645operator!=(
const member_function_template_sptr& l,
4646 const member_function_template_sptr& r);
4653 shared_ptr<class_tdecl> class_tmpl_;
4672 {
return *class_tmpl_; }
4675 as_class_tdecl()
const
4676 {
return class_tmpl_;}
4692operator==(
const member_class_template_sptr& l,
4693 const member_class_template_sptr& r);
4696operator!=(
const member_class_template_sptr& l,
4697 const member_class_template_sptr& r);
4763 std::unique_ptr<priv> priv_;
4822 virtual bool visit_begin(
var_decl*);
4858fns_to_str(vector<function_decl*>::const_iterator a_begin,
4859 vector<function_decl*>::const_iterator a_end,
4860 vector<function_decl*>::const_iterator b_begin,
4861 vector<function_decl*>::const_iterator b_end,
Simplified implementation of std::optional just enough to be used as a replacement for our purposes a...
This type abstracts the configuration information of the library.
The abstraction of an interned string.
This class is to hold the value of the bound of a subrange. The value can be either signed or unsigne...
void set_signed(int64_t v)
Setter of the bound value as signed.
void set_signedness(enum signedness s)
Setter of the signedness (unsigned VS signed) of the bound value.
enum signedness get_signedness() const
Getter of the signedness (unsigned VS signed) of the bound value.
int64_t get_signed_value() const
Getter of the bound value as a signed value.
bool operator==(const bound_value &) const
Equality operator of the bound value.
uint64_t get_unsigned_value()
Getter of the bound value as an unsigned value.
bound_value()
Default constructor of the array_type_def::subrange_type::bound_value class.
void set_unsigned(uint64_t v)
Setter of the bound value as unsigned.
Abstraction for an array range type, like in Ada, or just for an array dimension like in C or C++.
void set_lower_bound(int64_t lb)
Setter of the lower bound.
bool is_non_finite() const
Test if the length of the subrange type is infinite.
void set_upper_bound(int64_t ub)
Setter of the upper bound of the subrange type.
void set_underlying_type(const type_base_sptr &)
Setter of the underlying type of the subrange, that is, the type that defines the range.
string as_string() const
Return a string representation of the sub range.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
bool operator!=(const decl_base &o) const
Equality operator.
int64_t get_upper_bound() const
Getter of the upper bound of the subrange type.
type_base_sptr get_underlying_type() const
Getter of the underlying type of the subrange, that is, the type that defines the range.
virtual bool operator==(const decl_base &) const
Equality operator.
int64_t get_lower_bound() const
Getter of the lower bound of the subrange type.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build a pretty representation for an array_type_def::subrange_type.
static string vector_as_string(const vector< subrange_sptr > &)
Return a string representation of a vector of subranges.
uint64_t get_length() const
Getter of the length of the subrange type.
translation_unit::language get_language() const
Getter of the language that generated this type.
The abstraction of an array type.
virtual bool is_non_finite() const
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Build and return the qualified name of the current instance of the array_type_def.
std::vector< subrange_sptr > subranges_type
Convenience typedef for a vector of subrange_sptr.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
const type_base_sptr get_element_type() const
Getter of the type of an array element.
void set_element_type(const type_base_sptr &element_type)
Setter of the type of array element.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
shared_ptr< subrange_type > subrange_sptr
Convenience typedef for a shared pointer on a function_decl::subrange.
const std::vector< subrange_sptr > & get_subranges() const
Get the array's subranges.
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of array_type_def.
translation_unit::language get_language() const
Get the language of the array.
virtual void append_subranges(const std::vector< subrange_sptr > &subs)
Append subranges from the vector.
Abstraction of a base specifier in a class declaration.
class_decl_sptr get_base_class() const
Get the base class referred to by the current base class specifier.
bool get_is_virtual() const
Getter of the "is-virtual" proprerty of the base class specifier.
long get_offset_in_bits() const
Getter of the offset of the base.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
Traverses an instance of class_decl::base_spec, visiting all the sub-types and decls that it might co...
virtual bool operator==(const decl_base &) const
Comparison operator for class_decl::base_spec.
Abstracts a class declaration.
shared_ptr< base_spec > base_spec_sptr
Convenience typedef.
friend void fixup_virtual_member_function(method_decl_sptr method)
When a virtual member function has seen its virtualness set by set_member_function_is_virtual(),...
friend bool equals(const class_decl &, const class_decl &, change_kind *)
Compares two instances of class_decl.
bool has_virtual_member_functions() const
Test if the current instance of class_decl has virtual member functions.
const virtual_mem_fn_map_type & get_virtual_mem_fns_map() const
Get the map that associates a virtual table offset to the virtual member functions with that virtual ...
bool is_struct() const
Test if the class is a struct.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
const base_specs & get_base_specifiers() const
Get the base specifiers for this class.
virtual ~class_decl()
Destructor of the class_decl type.
virtual void on_canonical_type_set()
This method is invoked automatically right after the current instance of class_decl has been canonica...
bool has_vtable() const
Test if the current instance has a vtable.
ssize_t get_biggest_vtable_offset() const
Get the highest vtable offset of all the virtual methods of the class.
bool has_virtual_bases() const
Test if the current instance of class_decl has at least one virtual base.
vector< base_spec_sptr > base_specs
Convenience typedef.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void add_base_specifier(shared_ptr< base_spec > b)
Add a base specifier to this class.
const member_functions & get_virtual_mem_fns() const
Get the virtual member functions of this class.
void sort_virtual_mem_fns()
Sort the virtual member functions by their virtual index.
virtual bool operator==(const decl_base &) const
Comparison operator for class_decl.
class_decl_sptr find_base_class(const string &qualified_name) const
Find a base class of a given qualified name for the current class.
friend void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
bool has_no_base_nor_member() const
Return true iff the class has no entity in its scope.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Getter of the pretty representation of the current instance of class_decl.
The base type of class_decl and union_decl.
friend bool equals(const class_or_union &, const class_or_union &, change_kind *)
Compares two instances of class_or_union.
virtual size_t get_num_anonymous_member_classes() const
Get the number of anonymous member classes contained in this class.
unordered_map< ssize_t, member_functions > virtual_mem_fn_map_type
Convenience typedef.
void add_member_function(method_decl_sptr f, access_specifier a, bool is_static, bool is_ctor, bool is_dtor, bool is_const)
Add a member function.
const var_decl_sptr find_anonymous_data_member(const var_decl_sptr &) const
Find an anonymous data member in the class.
const member_functions & get_member_functions() const
Get the member functions of this class_or_union.
unordered_map< string, method_decl_sptr > string_mem_fn_sptr_map_type
Convenience typedef.
friend void fixup_virtual_member_function(method_decl_sptr method)
When a virtual member function has seen its virtualness set by set_member_function_is_virtual(),...
virtual void remove_member_decl(decl_base_sptr)
Remove a given decl from the current class_or_union scope.
const member_function_templates & get_member_function_templates() const
Get the member function templates of this class.
virtual size_t get_size_in_bits() const
Getter of the size of the class_or_union type.
virtual size_t get_num_anonymous_member_unions() const
Get the number of anonymous member unions contained in this class.
void add_member_function_template(member_function_template_sptr)
Append a member function template to the class_or_union.
vector< type_base_sptr > member_types
Convenience typedef.
vector< method_decl_sptr > member_functions
Convenience typedef.
const data_members & get_data_members() const
Get the data members of this class_or_union.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
void add_data_member(var_decl_sptr v, access_specifier a, bool is_laid_out, bool is_static, size_t offset_in_bits)
Add a data member to the current instance of class_or_union.
const method_decl * find_member_function_from_signature(const string &s) const
Find a method (member function) using its signature (pretty representation) as a key.
method_decl_sptr find_member_function_sptr(const string &mangled_name)
Find a method, using its linkage name as a key.
virtual void set_size_in_bits(size_t)
Setter of the size of the class_or_union type.
decl_base_sptr insert_member_decl(decl_base_sptr member)
Insert a data member to this class_or_union type.
virtual decl_base_sptr add_member_decl(const decl_base_sptr &)
Add a member declaration to the current instance of class_or_union. The member declaration can be eit...
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void add_member_class_template(member_class_template_sptr m)
Append a member class template to the class_or_union.
const data_members & get_non_static_data_members() const
Get the non-static data members of this class_or_union.
const method_decl * find_member_function(const string &mangled_name) const
Find a method, using its linkage name as a key.
const data_members & get_static_data_members() const
Get the static data memebers of this class_or_union.
void maybe_fixup_members_of_anon_data_member(var_decl_sptr &anon_dm)
Fixup the members of the type of an anonymous data member.
virtual ~class_or_union()
Destrcutor of the class_or_union type.
bool has_no_member() const
virtual bool operator==(const decl_base &) const
Equality operator.
friend void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
virtual size_t get_alignment_in_bits() const
Getter of the alignment of the class_or_union type.
vector< var_decl_sptr > data_members
Convenience typedef.
const member_class_templates & get_member_class_templates() const
Get the member class templates of this class.
virtual void set_alignment_in_bits(size_t)
Setter of the alignment of the class type.
virtual size_t get_num_anonymous_member_enums() const
Get the number of anonymous member enums contained in this class.
const var_decl_sptr find_data_member(const string &) const
Find a data member of a given name in the current class_or_union.
unordered_map< string, method_decl * > string_mem_fn_ptr_map_type
Convenience typedef.
Abstract a class template.
shared_ptr< class_decl > get_pattern() const
Getter of the pattern of the template.
void set_pattern(class_decl_sptr p)
Setter of the pattern of the template.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual bool operator==(const decl_base &) const
Equality operator.
The abstraction of the relationship between an entity and its containing scope (its context)....
bool operator!=(const context_rel &o) const
Inequality operator.
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
The base type of all declarations.
void set_definition_of_declaration(const decl_base_sptr &)
Set the definition of this declaration-only decl_base.
void set_is_declaration_only(bool f)
Set a flag saying if the enum_type_decl is a declaration-only enum_type_decl.
virtual bool operator!=(const decl_base &) const
Inequality operator.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current decl.
scope_decl * get_scope() const
Return the type containing the current decl, if any.
void set_qualified_name(const interned_string &) const
Setter for the qualified name.
void set_is_in_public_symbol_table(bool)
Set the flag saying if this decl is from a symbol that is in a public symbols table,...
friend bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
const decl_base_sptr get_earlier_declaration() const
If this decl_base is a definition, get its earlier declaration.
virtual void set_linkage_name(const string &m)
Setter for the linkage name.
const decl_base * get_naked_definition_of_declaration() const
If this decl_base is declaration-only, get its definition, if any.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Compute the qualified name of the decl.
void clear_qualified_name()
Clear the qualified name of this decl.
virtual void set_name(const string &n)
Setter for the name of the decl.
const location & get_location() const
Get the location of a given declaration.
typedef_decl_sptr get_naming_typedef() const
Getter for the naming typedef of the current decl.
friend void remove_decl_from_scope(decl_base_sptr)
Remove a given decl from its scope.
virtual const interned_string & get_name() const
Getter for the name of the current decl.
virtual void set_scope(scope_decl *)
Setter of the scope of the current decl.
const interned_string & peek_qualified_name() const
Getter for the qualified name.
const context_rel * get_context_rel() const
Getter for the context relationship.
bool get_is_anonymous() const
Test if the current declaration is anonymous.
friend decl_base_sptr add_decl_to_scope(decl_base_sptr decl, scope_decl *scpe)
Appends a declaration to a given scope, if the declaration doesn't already belong to one and if the d...
friend void set_member_is_static(const decl_base_sptr &d, bool s)
Sets the static-ness property of a class member.
virtual const interned_string & get_scoped_name() const
Return the scoped name of the decl.
const decl_base_sptr get_definition_of_declaration() const
If this decl_base is declaration-only, get its definition, if any.
friend void set_member_access_specifier(decl_base &d, access_specifier a)
Sets the access specifier for a class member.
friend bool var_equals_modulo_types(const var_decl &, const var_decl &, change_kind *)
Compares two instances of var_decl without taking their type into account.
void set_naming_typedef(const typedef_decl_sptr &)
Set the naming typedef of the current instance of decl_base.
void set_location(const location &l)
Set the location for a given declaration.
void set_is_anonymous(bool)
Set the "is_anonymous" flag of the current declaration.
void set_visibility(visibility v)
Setter for the visibility of the decl.
void set_temporary_qualified_name(const interned_string &) const
Setter for the temporary qualified name of the current declaration.
friend bool equals(const decl_base &, const decl_base &, change_kind *)
Compares two instances of decl_base.
visibility get_visibility() const
Getter for the visibility of the decl.
visibility
ELF visibility.
bool get_is_declaration_only() const
Test if a decl_base is a declaration-only decl.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_earlier_declaration(const decl_base_sptr &)
set the earlier declaration of this decl_base definition.
const interned_string & get_linkage_name() const
Getter for the mangled name.
friend enum access_specifier get_member_access_specifier(const decl_base &d)
Gets the access specifier for a class member.
friend bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
virtual ~decl_base()
Destructor of the decl_base type.
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
const interned_string & get_qualified_parent_name() const
Return a copy of the qualified name of the parent of the current decl.
bool get_is_anonymous_or_has_anonymous_parent() const
bool get_has_anonymous_parent() const
Get the "has_anonymous_parent" flag of the current declaration.
bool get_is_in_public_symbol_table() const
Test if the decl is defined in a ELF symbol table as a public symbol.
const interned_string & peek_temporary_qualified_name() const
Getter of the temporary qualified name of the current declaration.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representatin of the current declaration.
friend bool maybe_compare_as_member_decls(const decl_base &l, const decl_base &r, change_kind *k)
Compare the properties that belong to the "is-a-member-relation" of a decl.
The abstraction for a data member context relationship. This relates a data member to its parent clas...
const var_decl * get_anonymous_data_member() const
Return a non-nil value if this data member context relationship has an anonymous data member....
void set_anonymous_data_member(var_decl *)
Set the containing anonymous data member of this data member context relationship....
The abstraction of the version of an ELF symbol.
version & operator=(const version &o)
Assign a version to the current one.
bool operator==(const version &o) const
Compares the current version against another one.
bool is_default() const
Getter for the 'is_default' property of the version.
const string & str() const
Getter for the version name.
bool operator!=(const version &o) const
Inequality operator.
Abstraction of an elf symbol.
const abg_compat::optional< std::string > & get_namespace() const
Getter of the 'namespace' property.
elf_symbol_sptr get_alias_which_equals(const elf_symbol &other) const
In the list of aliases of a given elf symbol, get the alias that equals this current symbol.
elf_symbol_sptr get_next_common_instance() const
Get the next common instance of the current common symbol.
type get_type() const
Getter for the type of the current instance of elf_symbol.
const elf_symbol_sptr get_main_symbol() const
Get the main symbol of an alias chain.
void set_is_in_ksymtab(bool is_in_ksymtab)
Setter of the 'is-in-ksymtab' property.
bool has_aliases() const
Check if the current elf_symbol has an alias.
void set_name(const string &n)
Setter for the name of the current intance of elf_symbol.
bool is_suppressed() const
Getter for the 'is-suppressed' property.
binding
The binding of a symbol.
int get_number_of_aliases() const
Get the number of aliases to this elf symbol.
string get_aliases_id_string(const string_elf_symbols_map_type &symtab, bool include_symbol_itself=true) const
Return a comma separated list of the id of the current symbol as well as the id string of its aliases...
void set_binding(binding b)
Setter for the binding of the current instance of elf_symbol.
void add_common_instance(const elf_symbol_sptr &)
Add a common instance to the current common elf symbol.
void add_alias(const elf_symbol_sptr &)
Add an alias to the current elf symbol.
void set_is_suppressed(bool is_suppressed)
Setter for the 'is-suppressed' property.
bool is_variable() const
Test if the current instance of elf_symbol is a variable symbol or not.
elf_symbol_sptr update_main_symbol(const std::string &)
Update the main symbol for a group of aliased symbols.
void set_size(size_t)
Setter of the size of the symbol.
const string & get_name() const
Getter for the name of the elf_symbol.
binding get_binding() const
Getter for the binding of the current instance of elf_symbol.
static bool get_name_and_version_from_id(const string &id, string &name, string &ver)
Given the ID of a symbol, get the name and the version of said symbol.
bool is_function() const
Test if the current instance of elf_symbol is a function symbol or not.
type
The type of a symbol.
void set_version(const version &v)
Setter for the version of the current instance of elf_symbol.
const abg_compat::optional< uint32_t > & get_crc() const
Getter of the 'crc' property.
void set_visibility(visibility v)
Setter of the visibility of the current instance of elf_symbol.
bool does_alias(const elf_symbol &) const
Test if the current symbol aliases another one.
bool is_main_symbol() const
Tests whether this symbol is the main symbol.
void set_crc(const abg_compat::optional< uint32_t > &crc)
Setter of the 'crc' property.
static elf_symbol_sptr create(const environment &e, size_t i, size_t s, const string &n, type t, binding b, bool d, bool c, const version &ve, visibility vi, bool is_in_ksymtab=false, const abg_compat::optional< uint32_t > &crc={}, const abg_compat::optional< std::string > &ns={}, bool is_suppressed=false)
Factory of instances of elf_symbol.
visibility
The visibility of the symbol.
version & get_version() const
Getter for the version of the current instanc of elf_symbol.
bool is_common_symbol() const
Return true if the symbol is a common one.
void set_index(size_t)
Setter for the index.
visibility get_visibility() const
Getter of the visibility of the current instance of elf_symbol.
bool has_other_common_instances() const
Return true if this common common symbol has other common instances.
size_t get_index() const
Getter for the index.
const string & get_id_string() const
Get a string that is representative of a given elf_symbol.
elf_symbol_sptr get_alias_from_name(const string &name) const
From the aliases of the current symbol, lookup one with a given name.
const environment & get_environment() const
Getter of the environment used by the current instance of elf_symbol.
void set_type(type t)
Setter for the type of the current instance of elf_symbol.
bool is_public() const
Test if the current instance of elf_symbol is public or not.
bool is_in_ksymtab() const
Getter of the 'is-in-ksymtab' property.
size_t get_size() const
Getter of the size of the symbol.
bool is_defined() const
Test if the current instance of elf_symbol is defined or not.
void set_namespace(const abg_compat::optional< std::string > &ns)
Setter of the 'namespace' property.
elf_symbol_sptr get_next_alias() const
Get the next alias of the current symbol.
bool operator==(const elf_symbol &) const
Test if two main symbols are textually equal, or, if they have aliases that are textually equal.
The abstraction of an enumerator.
enumerator()
Default constructor of the enum_type_decl::enumerator type.
bool operator!=(const enumerator &other) const
Inequality operator.
void set_name(const string &n)
Setter for the name of enum_type_decl::enumerator.
enum_type_decl * get_enum_type() const
Getter for the enum type that this enumerator is for.
const string & get_name() const
Getter for the name of the current instance of enum_type_decl::enumerator.
void set_enum_type(enum_type_decl *)
Setter for the enum type that this enumerator is for.
void set_value(int64_t v)
Setter for the value of enum_type_decl::enumerator.
const string & get_qualified_name(bool internal=false) const
Getter for the qualified name of the current instance of enum_type_decl::enumerator....
int64_t get_value() const
Getter for the value of enum_type_decl::enumerator.
bool operator==(const enumerator &other) const
Equality operator.
enumerator & operator=(const enumerator &)
Assignment operator of the enum_type_decl::enumerator type.
Abstracts a declaration for an enum type.
friend bool enum_has_non_name_change(const enum_type_decl &l, const enum_type_decl &r, change_kind *k)
Test if two enums differ, but not by a name change.
std::vector< enumerator > enumerators
Convenience typedef for a list of enumerator.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual ~enum_type_decl()
Destructor for the enum type declaration.
const enumerators & get_enumerators() const
const enumerators & get_sorted_enumerators() const
Get the lexicographically sorted vector of enumerators.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
type_base_sptr get_underlying_type() const
Return the underlying type of the enum.
virtual bool operator==(const decl_base &) const
Equality operator.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of enum_type_decl.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
bool decl_only_class_equals_definition() const
Getter of the "decl-only-class-equals-definition" flag.
bool is_void_pointer_type(const type_base_sptr &) const
Test if a given type is the same as the void pointer type of the environment.
bool user_set_analyze_exported_interfaces_only() const
Getter for a property that says if the user actually did set the analyze_exported_interfaces_only() p...
const vector< type_base_sptr > * get_canonical_types(const char *name) const
Get the vector of canonical types which have a given "stringrepresentation".
const type_base_sptr & get_void_type() const
Get the unique type_decl that represents a "void" type for the current environment....
bool is_variadic_parameter_type(const type_base *) const
Test if a type is a variadic parameter type as defined in the current environment.
static string & get_variadic_parameter_type_name()
Getter of the name of the variadic parameter type.
const type_base_sptr & get_void_pointer_type() const
Getter of the "pointer-to-void" IR node that is shared across the ABI corpus. This node must be the o...
const config & get_config() const
Getter of the general configuration object.
environment()
Default constructor of the environment type.
bool canonicalization_is_done() const
Test if the canonicalization of types created out of the current environment is done.
type_base * get_canonical_type(const char *name, unsigned index)
Get a given canonical type which has a given "stringrepresentation".
const type_base_sptr & get_variadic_parameter_type() const
Get a type_decl instance that represents a the type of a variadic function parameter....
bool is_void_type(const type_base_sptr &) const
Test if a given type is a void type as defined in the current environment.
virtual ~environment()
Destructor for the environment type.
bool canonicalization_started() const
Getter of a flag saying if the canonicalization process has started or not.
friend void keep_type_alive(type_base_sptr)
Make sure that the life time of a given (smart pointer to a) type is the same as the life time of the...
interned_string intern(const string &) const
Do intern a string.
std::unordered_map< string, std::vector< type_base_sptr > > canonical_types_map_type
A convenience typedef for a map of canonical types. The key is the pretty representation string of a ...
bool analyze_exported_interfaces_only() const
Getter for the property that controls if we are to restrict the analysis to the types that are only r...
canonical_types_map_type & get_canonical_types_map()
Getter the map of canonical types.
Abstraction of a function parameter.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Compute the qualified name of the parameter.
interned_string get_type_name() const
interned_string get_name_id() const
Get a name uniquely identifying the parameter in the function.
const string get_type_pretty_representation() const
virtual bool traverse(ir_node_visitor &v)
Traverse the diff sub-tree under the current instance function_decl.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Compute and return a copy of the pretty representation of the current function parameter.
Abstraction for a function declaration.
shared_ptr< parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
string get_pretty_representation_of_declarator(bool internal=false) const
Compute and return the pretty representation for the part of the function declaration that starts at ...
const function_type * get_naked_type() const
Fast getter of the type of the current instance of function_decl.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
void append_parameters(std::vector< parameter_sptr > &parms)
Append a vector of parameters to the type of this function.
bool is_variadic() const
Return true iff the function takes a variable number of parameters.
parameters::const_iterator get_first_non_implicit_parm() const
Getter for the first non-implicit parameter of a function decl.
const function_type_sptr get_type() const
Return the type of the current instance of function_decl.
function_decl(const string &name, function_type_sptr function_type, bool declared_inline, const location &locus, const string &mangled_name, visibility vis, binding bind)
Constructor of the function_decl.
const type_base_sptr get_return_type() const
function_decl_sptr clone() const
Create a new instance of function_decl that is a clone of the current one.
const std::vector< parameter_sptr > & get_parameters() const
void append_parameter(parameter_sptr parm)
Append a parameter to the type of this function.
void set_symbol(const elf_symbol_sptr &sym)
This sets the underlying ELF symbol for the current function decl.
virtual ~function_decl()
Destructor of the function_decl type.
const elf_symbol_sptr & get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using function_decl::set_sy...
virtual bool operator==(const decl_base &o) const
Comparison operator for function_decl.
bool is_declared_inline() const
Test if the function was declared inline.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of function_decl.
interned_string get_id() const
Return an ID that tries to uniquely identify the function inside a program or a library.
Abstract a function template declaration.
binding get_binding() const
Get the binding of the function template.
void set_pattern(shared_ptr< function_decl > p)
Set a new pattern to the function template.
shared_ptr< function_decl > get_pattern() const
Get the pattern of the function template.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual bool operator==(const decl_base &) const
Comparison operator for the function_tdecl type.
Abstraction of a function type.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
Traverses an instance of function_type, visiting all the sub-types and decls that it might contain.
shared_ptr< function_decl::parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
bool is_variadic() const
Test if the current instance of function_type is for a variadic function.
parameters::const_iterator get_first_parm() const
Get the first parameter of the function.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
virtual bool operator==(const type_base &) const
Equality operator for function_type.
void append_parameter(parameter_sptr parm)
Append a new parameter to the vector of parameters of the current instance of function_type.
void set_parameters(const parameters &p)
Setter for the parameters of the current instance of function_type.
const interned_string & get_cached_name(bool internal=false) const
Get the name of the current function_type.
const parameter_sptr get_parm_at_index_from_first_non_implicit_parm(size_t) const
Get the Ith parameter of the vector of parameters of the current instance of function_type.
type_base_sptr get_return_type() const
Getter for the return type of the current instance of function_type.
void set_return_type(type_base_sptr t)
Setter of the return type of the current instance of function_type.
parameters::const_iterator get_first_non_implicit_parm() const
Get the first parameter of the function.
const parameters & get_parameters() const
Getter for the set of parameters of the current intance of function_type.
friend bool equals(const function_type &, const function_type &, change_kind *)
Compare two function types.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Return a copy of the pretty representation of the current function_type.
This abstracts the global scope of a given translation unit.
The base class for the visitor type hierarchy used for traversing a translation unit.
bool allow_visiting_already_visited_type_node() const
Get if the walker using this visitor is allowed to re-visit a type node that was previously visited o...
bool type_node_has_been_visited(type_base *) const
Test if a given type node has been marked as visited.
void forget_visited_type_nodes()
Un-mark all visited type nodes.
ir_node_visitor()
Default Constructor of the ir_node_visitor type.
void mark_type_node_as_visited(type_base *)
Mark a given type node as having been visited.
The entry point to manage locations.
location create_new_location(const std::string &fle, size_t lne, size_t col)
Insert the triplet representing a source locus into our internal vector of location triplet....
void expand_location(const location &location, std::string &path, unsigned &line, unsigned &column) const
Given an instance of location type, return the triplet {path,line,column} that represents the source ...
The source location of a token.
location()
Default constructor for the location type.
bool get_is_artificial() const
Test if the location is artificial.
bool operator<(const location &other) const
"Less than" operator of the location type.
location & operator=(const location &l)
Assignment operator of the location.
bool operator==(const location &other) const
Equality operator of the location type.
location(const location &l)
Copy constructor of the location.
unsigned get_value() const
Get the value of the location.
void set_is_artificial(bool f)
Set the artificial-ness of the location.
string expand(void) const
Expand the location into a string.
Abstraction of a member function context relationship. This relates a member function to its parent c...
bool is_constructor() const
Getter for the 'is-constructor' property.
void vtable_offset(size_t s)
Setter for the vtable offset property.
bool is_const() const
Getter for the 'is-const' property.
void is_destructor(bool f)
Setter for the 'is-destructor' property.
void is_const(bool f)
Setter for the 'is-const' property.
size_t vtable_offset() const
Getter for the vtable offset property.
void is_constructor(bool f)
Setter for the 'is-constructor' property.
bool is_destructor() const
Getter for the 'is-destructor' property.
The base class for member types, data members and member functions. Its purpose is mainly to carry th...
access_specifier get_access_specifier() const
Getter for the access specifier of this member.
bool get_is_static() const
void set_access_specifier(access_specifier a)
Setter for the access specifier of this member.
void set_is_static(bool f)
Set a flag saying if the parameter is static or not.
Abstracts a member class template template.
virtual bool operator==(const member_base &o) const
Equality operator of the the member_class_template class.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
Abstract a member function template.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
Abstraction of the declaration of a method.
friend bool get_member_function_is_dtor(const function_decl &)
Test whether a member function is a destructor.
friend ssize_t get_member_function_vtable_offset(const function_decl &)
Get the vtable offset of a member function.
virtual void set_linkage_name(const string &)
Set the linkage name of the method.
friend void set_member_function_is_dtor(function_decl &, bool)
Set the destructor-ness property of a member function.
friend void set_member_function_is_const(function_decl &, bool)
set the const-ness property of a member function.
friend bool member_function_has_vtable_offset(const function_decl &)
Test if a virtual member function has a vtable offset set.
friend bool get_member_function_is_const(const function_decl &)
Test whether a member function is const.
const method_type_sptr get_type() const
friend bool get_member_function_is_ctor(const function_decl &)
Test whether a member function is a constructor.
friend void set_member_function_is_ctor(function_decl &, bool)
Setter for the is_ctor property of the member function.
Abstracts the type of a class member function.
void set_class_type(const class_or_union_sptr &t)
Sets the class type of the current instance of method_type.
friend interned_string get_method_type_name(const method_type &fn_type, bool internal)
Get the name of a given method type and return a copy of it.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
void set_is_const(bool)
Setter of the "is-const" property of method_type.
bool get_is_for_static_method() const
Test if the current method type is for a static method or not.
virtual ~method_type()
The destructor of method_type.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Return a copy of the pretty representation of the current method_type.
class_or_union_sptr get_class_type() const
Get the class type this method belongs to.
bool get_is_const() const
Getter of the "is-const" property of method_type.
The abstraction of a namespace declaration.
bool is_empty_or_has_empty_sub_namespaces() const
Test if the current namespace_decl is empty or contains empty namespaces itself.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
namespace_decl(const environment &env, const string &name, const location &locus, visibility vis=VISIBILITY_DEFAULT)
Constructor.
virtual bool operator==(const decl_base &) const
Return true iff both namespaces and their members are equal.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build and return a copy of the pretty representation of the namespace.
Abstracts non type template parameters.
const type_base_sptr get_type() const
Getter for the type of the template parameter.
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
The abstraction of a pointer type.
void set_pointed_to_type(const type_base_sptr &)
Set the pointed-to type of the pointer.
virtual void get_qualified_name(interned_string &, bool internal=false) const
Build and return the qualified name of the current instance of pointer_type_def.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual bool operator==(const decl_base &) const
Return true iff both instances of pointer_type_def are equal.
const type_base_sptr get_pointed_to_type() const
Getter of the pointed-to type.
type_base * get_naked_pointed_to_type() const
Getter of a naked pointer to the pointed-to type.
The abstraction of a pointer-to-member type.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Get the qualified name for the current ptr_to_mbr_type.
virtual const interned_string & get_name() const
Getter of the name of the current ptr-to-mbr-type.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
const type_base_sptr & get_containing_type() const
Getter of the type containing the member pointed-to by the current ptr_to_mbr_type.
bool operator==(const ptr_to_mbr_type &) const
Equality operator for the current ptr_to_mbr_type.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function for ptr_to_mbr_type.
const type_base_sptr & get_member_type() const
Getter of the member type of the current ptr_to_mbr_type.
virtual ~ptr_to_mbr_type()
Desctructor for ptr_to_mbr_type.
The abstraction of a qualified type.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation for the virtual qualified name builder for qualified_type_def.
void set_underlying_type(const type_base_sptr &)
Setter of the underlying type.
virtual size_t get_size_in_bits() const
Get the size of the qualified type def.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
string get_cv_quals_string_prefix() const
Compute and return the string prefix or suffix representing the qualifiers hold by the current instan...
CV
Bit field values representing the cv qualifiers of the underlying type.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
void set_cv_quals(CV cv_quals)
Setter of the const/value qualifiers bit field.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
CV get_cv_quals() const
Getter of the const/volatile qualifier bit field.
type_base_sptr get_underlying_type() const
Getter of the underlying type.
virtual bool operator==(const decl_base &) const
Equality operator for qualified types.
string build_name(bool, bool internal=false) const
Build the name of the current instance of qualified type.
Abstracts a reference type.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Build and return the qualified name of the current instance of the reference_type_def.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_pointed_to_type(type_base_sptr &pointed_to_type)
Setter of the pointed_to type of the current reference type.
virtual bool operator==(const decl_base &) const
Equality operator of the reference_type_def type.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of reference_type_def.
A declaration that introduces a scope.
virtual size_t get_num_anonymous_member_classes() const
Getter for the number of anonymous classes contained in this scope.
void remove_member_type(type_base_sptr t)
Remove a member type from the current class_or_union scope.
void insert_member_type(type_base_sptr t, declarations::iterator before)
Insert a member type.
std::vector< scope_decl_sptr > scopes
Convenience typedef for a vector of scope_decl_sptr.
void add_member_type(type_base_sptr t)
Add a member type to the current instance of class_or_union.
friend void remove_decl_from_scope(decl_base_sptr decl)
Remove a given decl from its scope.
virtual size_t get_num_anonymous_member_unions() const
Getter for the number of anonymous unions contained in this scope.
scopes & get_member_scopes()
Getter for the scopes carried by the current scope.
std::vector< decl_base_sptr > declarations
Convenience typedef for a vector of decl_base_sptr.
bool is_empty() const
Test if the current scope is empty.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
const type_base_sptrs_type & get_member_types() const
Get the member types of this scope_decl.
decl_base_sptr insert_member_decl(decl_base_sptr member, declarations::iterator before)
Insert a member decl to this scope, right before an element pointed to by a given iterator....
friend decl_base_sptr insert_decl_into_scope(decl_base_sptr decl, scope_decl::declarations::iterator before, scope_decl *scope)
Inserts a declaration into a given scope, before a given IR child node of the scope.
const type_base_sptrs_type & get_sorted_canonical_types() const
Return a vector of sorted canonical types of the current scope.
bool find_iterator_for_member(const decl_base *, declarations::iterator &)
Find a member of the current scope and return an iterator on it.
virtual void remove_member_decl(decl_base_sptr member)
Remove a declaration from the current scope.
virtual decl_base_sptr add_member_decl(const decl_base_sptr &member)
Add a member decl to this scope. Note that user code should not use this, but rather use add_decl_to_...
type_base_sptr find_member_type(const string &name) const
Find a member type of a given name, inside the current scope_decl.
const declarations & get_member_decls() const
Getter for the member declarations carried by the current scope_decl.
const canonical_type_sptr_set_type & get_canonical_types() const
@eturn the set of canonical types of the the current scope.
const type_base_sptrs_type & get_sorted_member_types() const
Get the sorted member types of this scope_decl.
friend decl_base_sptr add_decl_to_scope(decl_base_sptr decl, scope_decl *scope)
Appends a declaration to a given scope, if the declaration doesn't already belong to one and if the d...
virtual bool operator==(const decl_base &) const
Return true iff both scopes have the same names and have the same member decls.
const declarations & get_sorted_member_decls() const
Getter for the sorted member declarations carried by the current scope_decl.
virtual size_t get_num_anonymous_member_enums() const
Getter for the number of anonymous enums contained in this scope.
std::vector< function_type_sptr > function_types
Convenience typedef for a vector of function_type_sptr.
A type that introduces a scope.
virtual bool traverse(ir_node_visitor &)
Traverses an instance of scope_type_decl, visiting all the sub-types and decls that it might contain.
virtual bool operator==(const decl_base &) const
Equality operator between two scope_type_decl.
The base class of templates.
const std::list< template_parameter_sptr > & get_template_parameters() const
Get the list of template parameters of the current instance of template_decl.
virtual ~template_decl()
Destructor.
void add_template_parameter(const template_parameter_sptr p)
Add a new template parameter to the current instance of template_decl.
virtual bool operator==(const decl_base &o) const
Equality operator.
Base class for a template parameter. Client code should use the more specialized type_template_parame...
virtual ~template_parameter()
Destructor.
bool operator!=(const template_parameter &) const
Inequality operator.
Abstracts a template template parameter.
virtual bool operator==(const type_base &) const
Equality operator.
This is the abstraction of the set of relevant artefacts (types, variable declarations,...
void set_address_size(char)
Setter of the address size in this translation unit.
const std::string & get_absolute_path() const
Get the concatenation of the build directory and the relative path of the translation unit.
void set_is_constructed(bool)
Setter of the 'is_constructed" flag. It says if the translation unit is fully constructed or not.
bool operator==(const translation_unit &) const
Compare the current translation unit against another one.
shared_ptr< scope_decl > global_scope_sptr
Convenience typedef for a shared pointer on a global_scope.
const corpus * get_corpus() const
Get the corpus this translation unit is a member of.
char get_address_size() const
Getter of the address size in this translation unit.
const std::string & get_compilation_dir_path() const
Get the path of the directory that was 'current' when the translation unit was compiled.
friend type_base_sptr synthesize_type_from_translation_unit(const type_base_sptr &type, translation_unit &tu)
In a translation unit, lookup a given type or synthesize it if it's a qualified type.
void set_corpus(corpus *)
Set the corpus this translation unit is a member of.
void set_language(language l)
Setter of the language of the source code of the translation unit.
void bind_function_type_life_time(function_type_sptr) const
Ensure that the life time of a function type is bound to the life time of the current translation uni...
const scope_decl_sptr & get_global_scope() const
Getter of the the global scope of the translation unit.
bool is_empty() const
Tests whether if the current translation unit contains ABI artifacts or not.
bool is_constructed() const
Getter of the 'is_constructed" flag. It says if the translation unit is fully constructed or not.
friend function_type_sptr synthesize_function_type_from_translation_unit(const function_type &fn_type, translation_unit &tu)
In a translation unit, lookup the sub-types that make up a given function type and if the sub-types a...
const std::string & get_path() const
Get the path of the current translation unit.
void set_compilation_dir_path(const std::string &)
Set the path of the directory that was 'current' when the translation unit was compiled.
location_manager & get_loc_mgr()
Getter of the location manager for the current translation unit.
void set_path(const string &)
Set the path associated to the current instance of translation_unit.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse virtual function.
language
The language of the translation unit.
bool operator!=(const translation_unit &) const
Inequality operator.
const vector< function_type_sptr > & get_live_fn_types() const
Get the vector of function types that are used in the current translation unit.
const environment & get_environment() const
Getter of the environment of the current translation_unit.
const type_maps & get_types() const
Getter of the types of the current translation_unit.
language get_language() const
Getter of the language of the source code of the translation unit.
The interface for types which are feeling social and want to be visited during the traversal of a hie...
An abstraction helper for type declarations.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current type.
type_base * get_naked_canonical_type() const
Getter of the canonical type pointer.
virtual size_t get_size_in_bits() const
Getter for the size of the type.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
Default implementation of traversal for types. This function does nothing. It must be implemented by ...
virtual void on_canonical_type_set()
This method is invoked automatically right after the current instance of class_decl has been canonica...
virtual void set_size_in_bits(size_t)
Setter for the size of the type.
virtual bool operator!=(const type_base &) const
Inequality operator.
virtual bool operator==(const type_base &) const
Return true iff both type declarations are equal.
friend type_base_sptr canonicalize(type_base_sptr, bool, bool)
Compute the canonical type of a given type.
virtual size_t get_alignment_in_bits() const
Getter for the alignment of the type.
virtual void set_alignment_in_bits(size_t)
Setter for the alignment of the type.
type_base_sptr get_canonical_type() const
Getter of the canonical type of the current instance of type_base.
This abstracts a composition of types based on template type parameters. The result of the compositio...
const type_base_sptr get_composed_type() const
Getter for the resulting composed type.
void set_composed_type(type_base_sptr t)
Setter for the resulting composed type.
A basic type declaration that introduces no scope.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation for the virtual qualified name builder for type_decl.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
virtual bool operator!=(const type_base &) const
Return true if both types equals.
virtual bool operator==(const type_base &) const
Return true if both types equals.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of type_decl.
This is a type that aggregates maps of all the kinds of types that are supported by libabigail.
istring_type_base_wptrs_map_type & typedef_types()
Getter for the map that associates the name of a typedef to the vector of instances of typedef_decl_s...
istring_type_base_wptrs_map_type & function_types()
Getter for the map that associates the name of a function type to the vector of instances of function...
istring_type_base_wptrs_map_type & reference_types()
Getter for the map that associates the name of a reference type to the vector of instances of referen...
const istring_type_base_wptrs_map_type & class_types() const
Getter for the map that associates the name of a class type to the vector of instances of class_decl_...
istring_type_base_wptrs_map_type & union_types()
Getter for the map that associates the name of a union type to the vector of instances of union_decl_...
istring_type_base_wptrs_map_type & array_types()
Getter for the map that associates the name of an array type to the vector of instances of array_type...
istring_type_base_wptrs_map_type & enum_types()
Getter for the map that associates the name of an enum type to the vector of instances of enum_type_d...
bool empty() const
Test if the type_maps is empty.
istring_type_base_wptrs_map_type & qualified_types()
Getter for the map that associates the name of a qualified type to the vector of instances of qualifi...
istring_type_base_wptrs_map_type & ptr_to_mbr_types()
Getter for the map that associates the name of a pointer-to-member type to the vector of instances of...
const vector< type_base_wptr > & get_types_sorted_by_name() const
Getter of all types types sorted by their pretty representation.
istring_type_base_wptrs_map_type & pointer_types()
Getter for the map that associates the name of a pointer type to the vector of instances of pointer_t...
const istring_type_base_wptrs_map_type & basic_types() const
Getter for the map that associates the name of a basic type to the vector instances of type_decl_sptr...
const istring_type_base_wptrs_map_type & subrange_types() const
Getter for the map that associates the name of a subrange type to the vector of instances of array_ty...
The base class of both types and declarations.
void set_translation_unit(translation_unit *)
Set the translation_unit this ABI artifact belongs to.
friend hash_t peek_hash_value(const type_or_decl_base &)
Get the hash value associated to an IR node.
friend type_or_decl_base::type_or_decl_kind operator&(type_or_decl_base::type_or_decl_kind, type_or_decl_base::type_or_decl_kind)
bitwise "AND" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
bool get_is_artificial() const
Getter of the flag that says if the artefact is artificial.
virtual ~type_or_decl_base()
The destructor of the type_or_decl_base type.
location & get_artificial_location() const
Getter of the artificial location of the artifact.
bool has_artificial_location() const
Test if the current ABI artifact carries an artificial location.
friend type_or_decl_base::type_or_decl_kind & operator|=(type_or_decl_base::type_or_decl_kind &, type_or_decl_base::type_or_decl_kind)
bitwise "|=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
const corpus * get_corpus() const
Get the corpus this ABI artifact belongs to.
friend hash_t set_or_get_cached_hash_value(const T &type_or_decl)
Set the hash value of an IR node and return it.
friend class_decl * is_class_type(const type_or_decl_base *)
Test whether a type is a class.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
enum type_or_decl_kind kind() const
Getter for the "kind" property of type_or_decl_base type.
friend type_or_decl_base::type_or_decl_kind & operator&=(type_or_decl_base::type_or_decl_kind &, type_or_decl_base::type_or_decl_kind)
bitwise "A&=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
void set_is_artificial(bool)
Setter of the flag that says if the artefact is artificial.
virtual bool traverse(ir_node_visitor &)
Traverse the the ABI artifact.
const void * runtime_type_instance() const
Getter of the pointer to the runtime type sub-object of the current instance.
const void * type_or_decl_base_pointer() const
Getter of the pointer to either the type_base sub-object of the current instance if it's a type,...
friend decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
friend type_or_decl_base::type_or_decl_kind operator|(type_or_decl_base::type_or_decl_kind, type_or_decl_base::type_or_decl_kind)
bitwise "OR" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
void set_artificial_location(const location &)
Setter of the artificial location of the artificat.
type_or_decl_kind
This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact....
const environment & get_environment() const
Getter of the environment of the current ABI artifact.
friend type_base * is_type(const type_or_decl_base *)
Test whether a declaration is a type.
const translation_unit * get_translation_unit() const
Get the translation_unit this ABI artifact belongs to.
Abstracts a type template parameter.
virtual bool operator==(const type_base &) const
Equality operator.
The abstraction of a typedef declaration.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation of the virtual "get_qualified_name" method.
void set_underlying_type(const type_base_sptr &)
Setter ofthe underlying type of the typedef.
virtual size_t get_size_in_bits() const
Return the size of the typedef.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
type_base_sptr get_underlying_type() const
Getter of the underlying type of the typedef.
virtual bool operator==(const decl_base &) const
Equality operator.
virtual size_t get_alignment_in_bits() const
Return the alignment of the typedef.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build a pretty representation for a typedef_decl.
Abstracts a union type declaration.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual bool operator==(const decl_base &) const
Comparison operator for union_decl.
virtual ~union_decl()
Destructor of the union_decl type.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Getter of the pretty representation of the current instance of union_decl.
Abstracts a variable declaration.
binding get_binding() const
Getter of the binding of the variable.
void set_type(type_base_sptr &)
Setter of the type of the variable.
void set_binding(binding b)
Setter of the binding of the variable.
friend uint64_t get_data_member_offset(const var_decl_sptr m)
Get the offset of a data member.
var_decl_sptr clone() const
Create a new var_decl that is a clone of the current one.
virtual const interned_string & get_qualified_name(bool internal=false) const
Get the qualified name of a given variable or data member.
const type_base * get_naked_type() const
Getter of the type of the variable.
friend bool get_data_member_is_laid_out(const var_decl &m)
Test whether a data member is laid out.
const type_base_sptr get_type() const
Getter of the type of the variable.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
string get_anon_dm_reliable_name(bool qualified=true) const
Get a name that is valid even for an anonymous data member.
friend uint64_t get_absolute_data_member_offset(const var_decl &m)
Get the absolute offset of a data member.
void set_symbol(const elf_symbol_sptr &sym)
Sets the underlying ELF symbol for the current variable.
friend void set_data_member_offset(var_decl_sptr m, uint64_t o)
Set the offset of a data member into its containing class.
friend void set_data_member_is_laid_out(var_decl_sptr m, bool l)
Set a flag saying if a data member is laid out.
const elf_symbol_sptr & get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using var_decl::set_symbol(...
virtual bool operator==(const decl_base &) const
Comparison operator of var_decl.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build and return the pretty representation of this variable.
interned_string get_id() const
Return an ID that tries to uniquely identify the variable inside a program or a library.
real_type::modifiers_type operator~(real_type::modifiers_type l)
Bitwise one's complement operator for real_type::modifiers_type.
shared_ptr< reference_type_def > reference_type_def_sptr
Convenience typedef for a shared pointer on a reference_type_def.
bool enum_has_non_name_change(const enum_type_decl &l, const enum_type_decl &r, change_kind *k)
Test if two enums differ, but not by a name change.
hash_t peek_hash_value(const type_or_decl_base &artefact)
Get the hash value associated to an IR node.
shared_ptr< method_type > method_type_sptr
Convenience typedef for shared pointer to method_type.
unordered_map< string, type_base_sptr > string_type_base_sptr_map_type
A convenience typedef for a map which key is a string and which value is a type_base_sptr.
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
access_specifier
Access specifier for class members.
bool function_decls_alias(const function_decl &f1, const function_decl &f2)
Test if two function declarations are aliases.
shared_ptr< class_tdecl > class_tdecl_sptr
Convenience typedef for a shared pointer on a class_tdecl.
corpus::origin operator|=(corpus::origin &l, corpus::origin r)
Bitwise |= operator for the corpus::origin type.
void fixup_virtual_member_function(method_decl_sptr method)
When a virtual member function has seen its virtualness set by set_member_function_is_virtual(),...
bool equals_modulo_cv_qualifier(const array_type_def *l, const array_type_def *r)
Test if two variables are equals modulo CV qualifiers.
unordered_set< type_or_decl_base_sptr, type_or_decl_hash, type_or_decl_equal > artifact_sptr_set_type
A convenience typedef for a hash set of type_or_decl_base_sptr.
string translation_unit_language_to_string(translation_unit::language l)
Converts a translation_unit::language enumerator into a string.
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
class_decl::base_spec * is_class_base_spec(const type_or_decl_base *tod)
Test if an ABI artifact is a class base specifier.
array_type_def::subrange_type * is_subrange_type(const type_or_decl_base *type)
Test if a type is an array_type_def::subrange_type.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
unordered_set< const type_or_decl_base *, type_or_decl_hash, type_or_decl_equal > artifact_ptr_set_type
A convenience typedef for a hash set of const type_or_decl_base*.
change_kind
A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal ...
@ LOCAL_TYPE_CHANGE_KIND
This means that a given IR artifact has a local type change.
@ SUBTYPE_CHANGE_KIND
This means that a given IR artifact has changes in some of its sub-types, with respect to the other a...
@ ALL_LOCAL_CHANGES_MASK
Testing (anding) against this mask means that a given IR artifact has local differences,...
@ LOCAL_NON_TYPE_CHANGE_KIND
This means that a given IR artifact has a local non-type change. That is a change that is carried by ...
bool operator==(const translation_unit_sptr &l, const translation_unit_sptr &r)
A deep comparison operator for pointers to translation units.
vector< type_base_sptr > type_base_sptrs_type
Helper typedef for a vector of shared pointer to a type_base.
string get_pretty_representation(const type_or_decl_base *tod, bool internal)
Build and return a copy of the pretty representation of an ABI artifact that could be either a type o...
std::vector< elf_symbol_sptr > elf_symbols
Convenience typedef for a vector of elf_symbol.
shared_ptr< template_parameter > template_parameter_sptr
Convenience typedef for shared pointer to template parameter.
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
bool string_to_elf_symbol_type(const string &s, elf_symbol::type &t)
Convert a string representing a symbol type into an elf_symbol::type.
void fns_to_str(vector< function_decl * >::const_iterator a_begin, vector< function_decl * >::const_iterator a_end, vector< function_decl * >::const_iterator b_begin, vector< function_decl * >::const_iterator b_end, std::ostream &o)
For each sequence of functions given in argument, generate a sequence of string that matches a given ...
string get_name(const type_or_decl_base *tod, bool qualified)
Build and return a copy of the name of an ABI artifact that is either a type or a decl.
void set_member_access_specifier(decl_base &d, access_specifier a)
Sets the access specifier for a class member.
abg_compat::optional< uint64_t > hash_t
The abstraction for an 8 bytes hash value.
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
shared_ptr< typedef_decl > typedef_decl_sptr
Convenience typedef for a shared pointer on a typedef_decl.
std::ostream & operator<<(std::ostream &o, elf_symbol::type t)
Serialize an instance of symbol_type and stream it to a given output stream.
bool var_equals_modulo_types(const var_decl &l, const var_decl &r, change_kind *k)
Compares two instances of var_decl without taking their type into account.
void sort_types(const canonical_type_sptr_set_type &types, vector< type_base_sptr > &result)
Sort types in a hopefully stable manner.
corpus::origin operator|(corpus::origin l, corpus::origin r)
Bitwise | operator for the corpus::origin type.
bool elf_symbol_is_function(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
bool is_cplus_plus_language(translation_unit::language l)
Test if a language enumerator designates the C++ language.
std::unordered_map< string, elf_symbol_sptr > string_elf_symbol_sptr_map_type
Convenience typedef for a map which key is a string and which value if the elf symbol of the same nam...
unordered_map< interned_string, type_base_wptrs_type, hash_interned_string > istring_type_base_wptrs_map_type
A convenience typedef for a map which key is an interned_string and which value is a vector of type_b...
bool function_decl_is_less_than(const function_decl &f, const function_decl &s)
Test if the pretty representation of a given function_decl is lexicographically less then the pretty ...
bool elf_symbols_alias(const elf_symbol &s1, const elf_symbol &s2)
Test if two symbols alias.
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
corpus::origin operator&(corpus::origin l, corpus::origin r)
Bitwise & operator for the corpus::origin type.
shared_ptr< scope_decl > scope_decl_sptr
Convenience typedef for a shared pointer on a scope_decl.
bool string_to_elf_symbol_binding(const string &s, elf_symbol::binding &b)
Convert a string representing a an elf symbol binding into an elf_symbol::binding.
shared_ptr< type_or_decl_base > type_or_decl_base_sptr
A convenience typedef for a shared_ptr to type_or_decl_base.
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
shared_ptr< string_elf_symbols_map_type > string_elf_symbols_map_sptr
Convenience typedef for a shared pointer to string_elf_symbols_map_type.
shared_ptr< context_rel > context_rel_sptr
A convenience typedef for shared pointers to context_rel.
shared_ptr< string_elf_symbol_sptr_map_type > string_elf_symbol_sptr_map_sptr
Convenience typedef for a shared pointer to an string_elf_symbol_sptr_map_type.
qualified_type_def_sptr lookup_qualified_type(const interned_string &type_name, const translation_unit &tu)
Lookup a qualified type from a translation unit.
bool is_java_language(translation_unit::language l)
Test if a language enumerator designates the Java language.
function_decl::parameter * is_function_parameter(const type_or_decl_base *tod)
Test whether a declaration is a function_decl.
bool equals(const decl_base &l, const decl_base &r, change_kind *k)
Compares two instances of decl_base.
bool string_to_elf_symbol_visibility(const string &s, elf_symbol::visibility &v)
Convert a string representing a an elf symbol visibility into an elf_symbol::visibility.
weak_ptr< elf_symbol > elf_symbol_wptr
A convenience typedef for a weak pointer to elf_symbol.
shared_ptr< pointer_type_def > pointer_type_def_sptr
Convenience typedef for a shared pointer on a pointer_type_def.
bool is_enumerator_present_in_enum(const enum_type_decl::enumerator &enr, const enum_type_decl &enom)
Test if a given enumerator is found present in an enum.
translation_unit::language string_to_translation_unit_language(const string &l)
Parse a string representing a language into a translation_unit::language enumerator into a string.
const function_decl::parameter * get_function_parameter(const decl_base *fun, unsigned parm_index)
Get the function parameter designated by its index.
var_decl * is_var_decl(const type_or_decl_base *tod)
Tests if a declaration is a variable declaration.
bool is_c_language(translation_unit::language l)
Test if a language enumerator designates the C language.
method_decl * is_method_decl(const type_or_decl_base *d)
Test if a function_decl is actually a method_decl.
access_specifier get_member_access_specifier(const decl_base &d)
Gets the access specifier for a class member.
shared_ptr< enum_type_decl > enum_type_decl_sptr
Convenience typedef for shared pointer to a enum_type_decl.
vector< type_base * > type_base_ptrs_type
Helper typedef for a vector of pointer to type_base.
unordered_set< uintptr_t > pointer_set
A convenience typedef for an unordered set of pointer values.
unordered_map< interned_string, type_base_wptr, hash_interned_string > istring_type_base_wptr_map_type
A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr.
vector< namespace_decl_sptr > namespaces_type
A convenience typedef for vectors of namespace_decl_sptr.
interned_string get_name_of_qualified_type(const type_base_sptr &underlying_type, qualified_type_def::CV quals, bool qualified, bool internal)
Get the name of a qualified type, given the underlying type and its qualifiers.
shared_ptr< template_decl > template_decl_sptr
Convenience typedef for a shared pointer to template_decl.
string get_string_representation_of_cv_quals(const qualified_type_def::CV cv_quals)
Get the string representation of a CV qualifier bitmap.
std::set< translation_unit_sptr, shared_translation_unit_comp > translation_units
Convenience typedef for an ordered set of translation_unit_sptr.
const var_decl * lookup_data_member(const type_base *type, const char *dm_name)
Look for a data member of a given class, struct or union type and return it.
shared_ptr< type_decl > type_decl_sptr
Convenience typedef for a shared pointer on a type_decl.
unordered_set< type_base_sptr, canonical_type_hash > canonical_type_sptr_set_type
Helper typedef for an unordered set of type_base_sptr which uses pointer value to tell its members ap...
bool is_ada_language(translation_unit::language l)
Test if a language enumerator designates the Ada language.
unordered_map< interned_string, type_or_decl_base_sptr, hash_interned_string > istring_type_or_decl_base_sptr_map_type
A convenience typedef for a map which key is an interned_string and which value is a type_base_wptr.
corpus::origin operator&=(corpus::origin &l, corpus::origin r)
Bitwise &= operator for the corpus::origin type.
bool operator!=(const translation_unit_sptr &l, const translation_unit_sptr &r)
A deep inequality operator for pointers to translation units.
function_decl * is_function_decl(const type_or_decl_base *d)
Test whether a declaration is a function_decl.
bool elf_symbol_is_variable(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
std::unordered_map< string, elf_symbols > string_elf_symbols_map_type
Convenience typedef for a map which key is a string and which value is a vector of elf_symbol.
method_decl_sptr copy_member_function(const class_or_union_sptr &t, const method_decl_sptr &method)
Copy a method of a class_or_union into a new class_or_union.
shared_ptr< function_tdecl > function_tdecl_sptr
Convenience typedef for a shared pointer on a function_tdecl.
unordered_map< string, type_base_wptr > string_type_base_wptr_map_type
A convenience typedef for a map which key is a string and which value is a type_base_wptr.
bool maybe_compare_as_member_decls(const decl_base &l, const decl_base &r, change_kind *k)
Compare the properties that belong to the "is-a-member-relation" of a decl.
Toplevel namespace for libabigail.
bool operator==(const std::string &l, const interned_string &r)
Equality operator.
A functor to hash instances of interned_string.
Hash functor for instances of array_type_def::hash.
Hash functor for instances of array_type_def::subrange_type.
Functor to hash a canonical type by using its pointer value.
size_t operator()(const type_base_sptr &l) const
Hash a type by returning the pointer value of its canonical type.
The hashing functor for class_decl::base_spec.
Hasher for the class_decl type.
Hasher for the class_or_union type.
Hash functor for instances of enum_type_decl.
The private data of the environment type.
Equality functor for instances of function_decl.
bool operator()(const function_decl *l, const function_decl *r) const
Tests if two pointers to function_decl are equal.
The hashing functor for function_type.
The type of the private data of the function_type type.
The base of an entity of the intermediate representation that is to be traversed.
virtual bool traverse(ir_node_visitor &v)
Traverse a given IR node and its children, calling an visitor on each node.
The hashing functor for member_base.
Hashing functor for the method_type type.
The base class for the visitor type hierarchy used for traversing a hierarchy of nodes.
Hash functor for instances of pointer_type_def.
Hash functor for instances of ptr_to_mbr_type.
Hash functor for instances of qualified_type_def.
Hash functor for instances of reference_type_def.
A comparison functor to compare translation units based on their absolute paths.
bool operator()(const translation_unit_sptr &lhs, const translation_unit_sptr &rhs) const
Compare two translations units based on their absolute paths.
Private type to hold private members of translation_unit.
Hash functor for instances of type_base.
Definition of the private data of type_base.
Hash functor for instances of type_decl.
The private data of type_or_decl_base.
A comparison functor to compare pointer to instances of type_or_decl_base.
bool operator()(const type_or_decl_base_sptr &f, const type_or_decl_base_sptr &s)
Comparison operator for ABI artifacts.
bool operator()(const type_or_decl_base *f, const type_or_decl_base *s)
Comparison operator for ABI artifacts.
The comparison functor for using instances of type_or_decl_base as values in a hash map or set.
bool operator()(const type_or_decl_base_sptr &l, const type_or_decl_base_sptr &r) const
The function-call operator to compare the string representations of two ABI artifacts.
bool operator()(const type_or_decl_base *l, const type_or_decl_base *r) const
The function-call operator to compare the string representations of two ABI artifacts.
The hashing functor for using instances of type_or_decl_base as values in a hash map or set.
size_t operator()(const type_or_decl_base *artifact) const
Function-call Operator to hash the string representation of an ABI artifact.
size_t operator()(const type_or_decl_base_sptr &artifact) const
Function-call Operator to hash the string representation of an ABI artifact.
A predicate for deep equality of instances of type_base*.
A predicate for deep equality of instances of shared_ptr<type_base>
Hash functor for instances of typedef_decl.
Hash functor for instances of union_decl type.
A comparison functor for pointers to var_decl.
bool operator()(const var_decl *l, const var_decl *r) const
Return true if the two instances of var_decl are equal.