23 #include <unordered_map>
97 using std::unordered_map;
105 size_t operator()(
const type_base_sptr& l)
const;
112 typedef unordered_set<type_base_sptr,
122 sort_types(
const canonical_type_sptr_set_type& types,
123 vector<type_base_sptr>& result);
143 std::unique_ptr<priv> priv_;
149 typedef std::unordered_map<string, std::vector<type_base_sptr> >
162 const type_base_sptr&
165 const type_base_sptr&
168 const type_base_sptr&
211 intern(
const string&)
const;
225 #ifdef WITH_DEBUG_SELF_COMPARISON
227 set_self_comparison_debug_input(
const corpus_sptr&
corpus);
230 get_self_comparison_debug_inputs(corpus_sptr& first_corpus,
231 corpus_sptr& second_corpus);
234 self_comparison_debug_is_on(
bool);
237 self_comparison_debug_is_on()
const;
240 #ifdef WITH_DEBUG_TYPE_CANONICALIZATION
242 debug_type_canonicalization_is_on(
bool flag);
245 debug_type_canonicalization_is_on()
const;
248 debug_die_canonicalization_is_on(
bool flag);
251 debug_die_canonicalization_is_on()
const;
258 #ifdef WITH_DEBUG_SELF_COMPARISON
259 const unordered_map<string, uintptr_t>&
260 get_type_id_canonical_type_map()
const;
262 unordered_map<string, uintptr_t>&
263 get_type_id_canonical_type_map();
265 const unordered_map<uintptr_t, string>&
266 get_pointer_type_id_map()
const;
268 unordered_map<uintptr_t, string>&
269 get_pointer_type_id_map();
272 get_type_id_from_pointer(uintptr_t ptr)
const;
275 get_type_id_from_type(
const type_base *ptr)
const;
278 get_canonical_type_from_type_id(
const char*)
const;
314 : value_(v), loc_manager_(m), is_artificial_(
false)
322 get_location_manager()
const
323 {
return loc_manager_;}
341 {
return is_artificial_;}
357 {is_artificial_ = f;}
364 loc_manager_(l.loc_manager_),
365 is_artificial_(l.is_artificial_)
375 loc_manager_ = l.loc_manager_;
376 is_artificial_ = l.is_artificial_;
382 : value_(), loc_manager_(), is_artificial_()
394 operator bool()
const
404 {
return value_ == other.value_;}
414 {
return value_ < other.value_;}
428 expand(std::string& path,
unsigned& line,
unsigned& column)
const;
443 std::unique_ptr<priv> priv_;
456 unsigned& line,
unsigned& column)
const;
489 std::hash<string> do_hash;
490 return do_hash(repr);
527 return repr1 == repr2;
567 typedef unordered_map<interned_string, type_base_wptr, hash_interned_string>
577 typedef unordered_map<interned_string,
581 typedef unordered_map<interned_string,
595 std::unique_ptr<priv> priv_;
678 const vector<type_base_wptr>&
688 std::unique_ptr<priv> priv_;
732 const std::string& path,
733 char address_size = 0);
782 const vector<function_type_sptr>&
819 lookup_function_type_in_translation_unit(
const function_type& t,
826 friend type_base_sptr
845 {
return lhs->get_absolute_path() < rhs->get_absolute_path();}
872 operator==(
const translation_unit_sptr&,
const translation_unit_sptr&);
875 operator!=(
const translation_unit_sptr&,
const translation_unit_sptr&);
895 typedef std::unordered_map<string, elf_symbol_sptr>
900 typedef shared_ptr<string_elf_symbol_sptr_map_type>
908 typedef std::unordered_map<string, elf_symbols>
951 PROTECTED_VISIBILITY,
961 std::unique_ptr<priv> priv_;
980 elf_symbol(
const elf_symbol&);
983 operator=(
const elf_symbol& s);
987 static elf_symbol_sptr
988 create(
const environment& e,
1001 bool is_suppressed =
false);
1087 const elf_symbol_sptr
1133 get_alias_with_default_symbol_version()
const;
1137 bool include_symbol_itself =
true)
const;
1179 operator==(
const elf_symbol_sptr& lhs,
const elf_symbol_sptr& rhs);
1182 operator!=(
const elf_symbol_sptr& lhs,
const elf_symbol_sptr& rhs);
1188 compute_aliases_for_elf_symbol(
const elf_symbol& symbol,
1190 vector<elf_symbol_sptr>& alias_set);
1196 std::unique_ptr<priv> priv_;
1208 operator const string&()
const;
1214 str(
const string& s);
1279 get_access_specifier()
const
1287 get_is_static()
const
1288 {
return is_static_;}
1291 set_is_static(
bool s)
1301 return (access_ == o.access_
1302 && is_static_ == o.is_static_);
1314 {
return !operator==(o);}
1370 mutable std::unique_ptr<priv> priv_;
1372 type_or_decl_base();
1373 type_or_decl_base(
const type_or_decl_base&);
1383 ABSTRACT_TYPE_OR_DECL,
1384 ABSTRACT_DECL_BASE = 1,
1385 ABSTRACT_SCOPE_DECL = 1 << 1,
1386 GLOBAL_SCOPE_DECL = 1 << 2,
1387 NAMESPACE_DECL = 1 << 3,
1389 FUNCTION_DECL = 1 << 5,
1390 FUNCTION_PARAMETER_DECL = 1 << 6,
1391 METHOD_DECL = 1 << 7,
1392 TEMPLATE_DECL = 1 << 8,
1393 ABSTRACT_TYPE_BASE = 1 << 9,
1394 ABSTRACT_SCOPE_TYPE_DECL = 1 << 10,
1395 BASIC_TYPE = 1 << 11,
1396 SUBRANGE_TYPE = 1 << 12,
1397 QUALIFIED_TYPE = 1 << 13,
1398 POINTER_TYPE = 1 << 14,
1399 REFERENCE_TYPE = 1 << 15,
1400 POINTER_TO_MEMBER_TYPE = 1 << 16,
1401 ARRAY_TYPE = 1 << 17,
1402 ENUM_TYPE = 1 << 18,
1403 TYPEDEF_TYPE = 1 << 19,
1404 CLASS_TYPE = 1 << 20,
1405 UNION_TYPE = 1 << 21,
1406 FUNCTION_TYPE = 1 << 22,
1407 METHOD_TYPE = 1 << 23,
1436 operator=(
const type_or_decl_base&);
1483 bool qualified_name =
true)
const = 0;
1505 is_type(
const type_or_decl_base*);
1508 is_decl(
const type_or_decl_base* d);
1528 operator==(
const type_or_decl_base&,
const type_or_decl_base&);
1531 operator==(
const type_or_decl_base_sptr&,
const type_or_decl_base_sptr&);
1534 operator!=(
const type_or_decl_base_sptr&,
const type_or_decl_base_sptr&);
1546 const interned_string&
1555 const interned_string&
1582 VISIBILITY_PROTECTED,
1614 const string& mangled_name =
"",
1618 const interned_string& name,
1620 const interned_string& mangled_name = interned_string(),
1641 bool qualified_name =
true)
const;
1645 bool internal =
false)
const;
1647 virtual const interned_string&
1650 virtual const interned_string&
1665 const interned_string&
1668 const interned_string&
1692 const interned_string&
1707 const decl_base_sptr
1713 const decl_base_sptr
1742 friend decl_base_sptr
1748 friend decl_base_sptr
1750 vector<shared_ptr<decl_base> >::iterator,
1787 operator==(
const decl_base_sptr&,
const decl_base_sptr&);
1790 operator!=(
const decl_base_sptr&,
const decl_base_sptr&);
1793 operator==(
const type_base_sptr&,
const type_base_sptr&);
1796 operator!=(
const type_base_sptr&,
const type_base_sptr&);
1811 std::unique_ptr<priv> priv_;
1825 virtual decl_base_sptr
1838 const string& name,
const location& locus,
1849 const canonical_type_sptr_set_type&
1852 canonical_type_sptr_set_type&
1855 const type_base_sptrs_type&
1893 declarations::iterator before);
1904 const type_base_sptrs_type&
1907 const type_base_sptrs_type&
1918 friend decl_base_sptr
1921 friend decl_base_sptr
1923 scope_decl::declarations::iterator before,
1963 {
return translation_unit_;}
1991 static type_base_sptr
1992 get_canonical_type_for(type_base_sptr);
2023 const interned_string&
2060 operator()(
const type_base_sptr t)
const;
2088 operator()(
const type_base_sptr l,
const type_base_sptr r)
const
2093 if (l.get() == r.get())
2119 size_t size_in_bits,
2120 size_t alignment_in_bits,
2122 const string& mangled_name =
"",
2145 bool internal =
false)
const;
2147 virtual const interned_string&
2152 bool qualified_name =
true)
const;
2180 size_t size_in_bits,
size_t alignment_in_bits,
2205 bool qualified_name =
true)
const;
2228 std::unique_ptr<priv> priv_;
2234 string build_name(
bool,
bool internal =
false)
const;
2248 CV_VOLATILE = 1 << 1,
2249 CV_RESTRICT = 1 << 2
2285 bool internal =
false)
const;
2287 virtual const interned_string&
2297 operator==(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2300 operator!=(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2326 bool qualified =
true,
bool internal =
false);
2328 qualified_type_def_sptr
2339 std::unique_ptr<priv> priv_;
2352 pointer_type_def(
const type_base_sptr& pointed_to_type,
size_t size_in_bits,
2353 size_t alignment_in_bits,
const location& locus);
2356 size_t alignment_in_bits,
const location& locus);
2370 const type_base_sptr
2379 virtual const interned_string&
2402 std::unique_ptr<priv> priv_;
2416 bool lvalue,
size_t size_in_bits,
2417 size_t alignment_in_bits,
const location& locus);
2420 size_t alignment_in_bits,
const location& locus);
2435 get_pointed_to_type()
const;
2442 bool internal =
false)
const;
2444 virtual const interned_string&
2449 bool qualified_name =
true)
const;
2468 std::unique_ptr<priv> priv_;
2475 const type_base_sptr& member_type,
2476 const type_base_sptr& containing_type,
2477 size_t size_in_bits,
2478 size_t alignment_in_bits,
2481 const type_base_sptr&
2484 const type_base_sptr&
2498 bool internal =
false)
const;
2500 virtual const interned_string&
2521 std::unique_ptr<priv> priv_;
2547 std::unique_ptr<priv> priv_;
2564 UNSIGNED_SIGNEDNESS,
2596 const type_base_sptr& underlying_type,
2669 bool qualified_name =
true)
const;
2676 const std::vector<subrange_sptr>& subs,
2680 const std::vector<subrange_sptr>& subs,
2694 bool internal =
false)
const;
2696 virtual const interned_string&
2699 const type_base_sptr
2709 get_dimension_count()
const;
2716 bool qualified_name =
true)
const;
2719 get_subrange_representation()
const;
2727 const std::vector<subrange_sptr>&
2752 std::unique_ptr<priv> priv_;
2784 type_base_sptr underlying_type,
2786 const string& mangled_name =
"",
2803 bool qualified_name =
true)
const;
2837 std::unique_ptr<priv> priv_;
2845 enumerator(
const string& name, int64_t value);
2891 std::unique_ptr<priv> priv_;
2902 const type_base_sptr underlying_type,
2904 const string& mangled_name =
"",
2910 const string& mangled_name =
"",
2927 bool qualified_name =
true)
const;
2937 bool internal =
false)
const;
2939 virtual const interned_string&
2957 std::unique_ptr<priv> priv_;
2964 size_t offset_in_bits,
2971 get_is_laid_out()
const;
2974 set_is_laid_out(
bool f);
2977 get_offset_in_bits()
const;
2980 set_offset_in_bits(
size_t o);
3010 std::unique_ptr<priv> priv_;
3026 var_decl(
const string& name,
3027 type_base_sptr type,
3029 const string& mangled_name,
3036 const type_base_sptr
3054 const elf_symbol_sptr&
3063 virtual const interned_string&
3071 bool qualified_name =
true)
const;
3079 virtual ~var_decl();
3142 bool declared_inline,
3144 const string& mangled_name,
3149 type_base_sptr fn_type,
3150 bool declared_inline,
3152 const string& mangled_name =
"",
3154 binding bind = BINDING_GLOBAL);
3158 bool qualified_name =
true)
const;
3163 const std::vector<parameter_sptr >&
3172 parameters::const_iterator
3181 const type_base_sptr
3190 const elf_symbol_sptr&
3200 get_binding()
const;
3255 const type_or_decl_base *s)
3268 return l_repr < r_repr;
3280 const type_or_decl_base_sptr& s)
3288 std::unique_ptr<priv> priv_;
3299 bool variadic_marker =
false);
3305 bool variadic_marker,
3306 bool is_artificial);
3311 bool variadic_marker =
false,
3312 bool is_artificial =
false);
3316 bool variadic_marker =
false);
3320 const type_base_sptr
3336 set_index(
unsigned i);
3339 get_variadic_marker()
const;
3355 bool internal =
false)
const;
3359 bool qualified_name =
true)
const;
3405 std::unique_ptr<priv> priv_;
3413 const parameters& parms,
3414 size_t size_in_bits,
3415 size_t alignment_in_bits);
3418 size_t size_in_bits,
3419 size_t alignment_in_bits);
3422 size_t size_in_bits,
3423 size_t alignment_in_bits);
3434 const parameter_sptr
3446 parameters::const_iterator
3449 parameters::const_iterator
3452 const interned_string&
3460 bool qualified_name =
true)
const;
3488 std::unique_ptr<priv> priv_;
3498 class_or_union_sptr class_type,
3499 const std::vector<function_decl::parameter_sptr>& parms,
3501 size_t size_in_bits,
3502 size_t alignment_in_bits);
3505 type_base_sptr class_type,
3506 const std::vector<function_decl::parameter_sptr>& parms,
3508 size_t size_in_bits,
3509 size_t alignment_in_bits);
3513 size_t size_in_bits,
3514 size_t alignment_in_bits);
3517 size_t size_in_bits,
3518 size_t alignment_in_bits);
3534 bool qualified_name =
true)
const;
3536 friend interned_string
3544 std::unique_ptr<priv> priv_;
3561 const std::list<template_parameter_sptr>&
3579 std::unique_ptr<priv> priv_;
3588 struct dynamic_hash;
3589 struct shared_ptr_hash;
3604 get_enclosing_template_decl()
const;
3607 get_hashing_has_started()
const;
3610 set_hashing_has_started(
bool f)
const;
3625 std::unique_ptr<priv> priv_;
3662 std::unique_ptr<priv> priv_;
3676 type_base_sptr type,
3687 const type_base_sptr
3709 std::unique_ptr<priv> priv_;
3747 std::unique_ptr<priv> priv_;
3756 type_base_sptr composed_type);
3758 const type_base_sptr
3785 std::unique_ptr<priv> priv_;
3818 shared_ptr<function_decl>
3834 std::unique_ptr<priv> priv_;
3864 shared_ptr<class_decl>
3892 : access_(a), is_static_(is_static)
3912 {
return is_static_;}
3936 bool declared_inline,
const location& locus,
3937 const string& mangled_name =
"",
3939 binding bind = BINDING_GLOBAL);
3943 bool declared_inline,
3945 const string& mangled_name =
"",
3947 binding bind = BINDING_GLOBAL);
3949 method_decl(
const string& name, type_base_sptr type,
3950 bool declared_inline,
const location& locus,
3951 const string& mangled_name =
"",
3953 binding bind = BINDING_GLOBAL);
3965 {function_decl::set_type(fn_type);}
3986 get_member_function_is_static(
const function_decl&);
3989 set_member_function_is_static(
const function_decl&,
bool);
4022 operator==(
const method_decl_sptr& l,
const method_decl_sptr& r);
4025 operator!=(
const method_decl_sptr& l,
const method_decl_sptr& r);
4040 virtual decl_base_sptr
4067 size_t size_in_bits,
size_t align_in_bits,
4069 member_types& mbrs, data_members& data_mbrs,
4070 member_functions& member_fns);
4073 size_t size_in_bits,
size_t align_in_bits,
4077 bool is_declaration_only =
true);
4102 bool is_laid_out,
bool is_static,
4103 size_t offset_in_bits);
4123 bool is_static,
bool is_ctor,
4124 bool is_dtor,
bool is_const);
4130 size_t vtable_offset,
4131 bool is_static,
bool is_ctor,
4132 bool is_dtor,
bool is_const);
4134 const member_functions&
4155 const member_function_templates&
4161 const member_class_templates&
4181 friend method_decl_sptr
4185 friend method_decl_sptr
4187 const method_decl_sptr& m);
4207 const method_decl_sptr& f);
4214 operator==(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4217 operator!=(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4238 insert_member_decl(decl_base_sptr member);
4273 size_t size_in_bits,
size_t align_in_bits,
4280 size_t size_in_bits,
size_t align_in_bits,
4287 size_t size_in_bits,
size_t align_in_bits,
4291 size_t size_in_bits,
size_t align_in_bits,
4296 bool is_declaration_only =
true);
4300 bool qualified_name =
true)
const;
4379 const method_decl_sptr& f);
4430 std::unique_ptr<priv> priv_;
4441 long offset_in_bits = -1,
bool is_virtual =
false);
4444 long offset_in_bits = -1,
bool is_virtual =
false);
4493 size_t size_in_bits,
const location& locus,
4498 size_t size_in_bits,
const location& locus,
4504 size_t size_in_bits,
const location& locus,
4508 size_t size_in_bits,
const location& locus,
4512 bool is_declaration_only =
true);
4516 bool qualified_name =
true)
const;
4541 const method_decl_sptr& f);
4548 operator==(
const union_decl_sptr& l,
const union_decl_sptr& r);
4551 operator!=(
const union_decl_sptr& l,
const union_decl_sptr& r);
4559 ssize_t vtable_offset_in_bits_;
4560 bool is_constructor_;
4561 bool is_destructor_;
4568 vtable_offset_in_bits_(-1),
4569 is_constructor_(
false),
4570 is_destructor_(
false),
4577 vtable_offset_in_bits_(-1),
4578 is_constructor_(
false),
4579 is_destructor_(
false),
4588 size_t vtable_offset_in_bits,
4592 is_virtual_(is_virtual),
4593 vtable_offset_in_bits_(vtable_offset_in_bits),
4594 is_constructor_(is_constructor),
4595 is_destructor_(is_destructor),
4601 {
return is_virtual_;}
4604 is_virtual(
bool is_virtual)
4605 {is_virtual_ = is_virtual;}
4615 {
return vtable_offset_in_bits_;}
4625 {vtable_offset_in_bits_ = s;}
4635 {
return is_constructor_;}
4643 {is_constructor_ = f;}
4652 {
return is_destructor_;}
4660 {is_destructor_ = f;}
4694 const char* dm_name);
4707 bool is_constructor_;
4709 shared_ptr<function_tdecl> fn_tmpl_;
4720 bool is_constructor,
bool is_const)
4721 : type_or_decl_base(f->get_environment()),
4723 member_base(access, is_static), is_constructor_(is_constructor),
4724 is_const_(is_const), fn_tmpl_(f)
4728 is_constructor()
const
4729 {
return is_constructor_;}
4739 as_function_tdecl()
const
4750 operator==(
const member_function_template_sptr& l,
4751 const member_function_template_sptr& r);
4754 operator!=(
const member_function_template_sptr& l,
4755 const member_function_template_sptr& r);
4762 shared_ptr<class_tdecl> class_tmpl_;
4774 : type_or_decl_base(c->get_environment()),
4781 {
return *class_tmpl_; }
4784 as_class_tdecl()
const
4785 {
return class_tmpl_;}
4801 operator==(
const member_class_template_sptr& l,
4802 const member_class_template_sptr& r);
4805 operator!=(
const member_class_template_sptr& l,
4806 const member_class_template_sptr& r);
4812 operator()(
const shared_ptr<type_base> t)
const;
4825 operator()(
const var_decl& t)
const;
4828 operator()(
const var_decl* t)
const;
4923 operator()(
const shared_ptr<function_tdecl> f)
const;
4935 operator()(
const shared_ptr<class_tdecl> t)
const;
4957 std::unique_ptr<priv> priv_;
5016 virtual bool visit_begin(var_decl*);
5017 virtual bool visit_end(var_decl*);
5019 virtual bool visit_begin(function_decl*);
5020 virtual bool visit_end(function_decl*);
5052 fns_to_str(vector<function_decl*>::const_iterator a_begin,
5053 vector<function_decl*>::const_iterator a_end,
5054 vector<function_decl*>::const_iterator b_begin,
5055 vector<function_decl*>::const_iterator b_end,
5060 #endif // __ABG_IR_H__
Testing (anding) against this mask means that a given IR artifact has local differences, with respect to the other artifact it was compared against. A local change is a change that is carried by the artifact itself (or its type), rather than by one off its sub-types.
elf_symbol_sptr get_next_common_instance() const
Get the next common instance of the current common symbol.
virtual bool operator==(const member_base &o) const
Equality operator of the the member_class_template class.
const enumerators & get_sorted_enumerators() const
Get the lexicographically sorted vector of enumerators.
const string & get_name() const
Getter for the name of the current instance of enum_type_decl::enumerator.
size_t operator()(const type_base *t) const
A hashing function for type declarations.
void set_pattern(shared_ptr< function_decl > p)
Set a new pattern to the function template.
void set_is_declaration_only(bool f)
Set a flag saying if the enum_type_decl is a declaration-only enum_type_decl.
const vector< function_type_sptr > & get_live_fn_types() const
Get the vector of function types that are used in the current translation unit.
bool operator==(const std::string &l, const interned_string &r)
Equality operator.
virtual ~class_or_union()
Destrcutor of the class_or_union type.
The type of the private data of the function_type type.
const std::vector< parameter_sptr > & get_parameters() const
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.
location_manager & get_loc_mgr()
Getter of the location manager for the current translation unit.
const canonical_type_sptr_set_type & get_canonical_types() const
the set of canonical types of the the current scope.
const member_class_templates & get_member_class_templates() const
Get the member class templates of this class.
The abstraction of an array type.
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...
The abstraction of an enumerator.
The base type of all declarations.
bool is_declared_inline() const
Test if the function was declared inline.
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.
A predicate for deep equality of instances of type_base*.
friend bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
scopes & get_member_scopes()
Getter for the scopes carried by the current scope.
std::vector< function_type_sptr > function_types
Convenience typedef for a vector of function_type_sptr.
enumerator & operator=(const enumerator &)
Assignment operator of the enum_type_decl::enumerator type.
virtual size_t get_num_anonymous_member_unions() const
Getter for the number of anonymous unions contained in this scope.
virtual void on_canonical_type_set()
This method is invoked automatically right after the current instance of class_decl has been canonica...
visibility get_visibility() const
Getter of the visibility of the current instance of elf_symbol.
const member_function_templates & get_member_function_templates() const
Get the member function templates of this class.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
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.
uint64_t get_unsigned_value()
Getter of the bound value as an unsigned value.
bool is_common_symbol() const
Return true if the symbol is a common one.
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...
translation_unit::language get_language() const
Getter of the language that generated this type.
visibility
The visibility of the symbol.
const void * runtime_type_instance() const
Getter of the pointer to the runtime type sub-object of the current instance.
size_t operator()(const type_base_sptr &l) const
Hash a type by returning the pointer value of its canonical type.
void add_template_parameter(const template_parameter_sptr p)
Add a new template parameter to the current instance of template_decl.
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...
This means that a given IR artifact has changes in some of its sub-types, with respect to the other a...
int64_t get_value() const
Getter for the value of enum_type_decl::enumerator.
bool has_no_base_nor_member() const
Return true iff the class has no entity in its scope.
parameters::const_iterator get_first_parm() const
Get the first parameter of the function.
friend void set_member_function_is_const(function_decl &, bool)
set the const-ness property of a member function.
bool has_no_member() const
virtual bool operator==(const type_base &) const
Equality operator.
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...
friend bool member_function_has_vtable_offset(const function_decl &)
Test if a virtual member function has a vtable offset set.
const string & str() const
Getter for the version name.
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...
friend void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
bool canonicalization_is_done() const
Test if the canonicalization of types created out of the current environment is done.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function for ptr_to_mbr_type.
void set_qualified_name(const interned_string &) const
Setter for the qualified name.
bool is_variable() const
Test if the current instance of elf_symbol is a variable symbol or not.
size_t operator()(const function_decl &t) const
Compute a hash value for an instance of function_decl.
bool is_constructed() const
Getter of the 'is_constructed" flag. It says if the translation unit is fully constructed or not...
Abstracts a member class template template.
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.
bool get_is_anonymous_or_has_anonymous_parent() const
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.
bool is_c_language(translation_unit::language l)
Test if a language enumerator designates the C language.
virtual void set_alignment_in_bits(size_t)
Setter for the alignment of the type.
A type that introduces a scope.
typedef_decl_sptr get_naming_typedef() const
Getter for the naming typedef of the current decl.
bool operator()(const type_or_decl_base *f, const type_or_decl_base *s)
Comparison operator for ABI artifacts.
virtual void set_linkage_name(const string &m)
Setter for the linkage name.
void add_member_class_template(member_class_template_sptr m)
Append a member class template to the class_or_union.
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.
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.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representatin of the current 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 "A&=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
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...
interned_string get_id() const
Return an ID that tries to uniquely identify the function inside a program or a library.
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
const environment & get_environment() const
Getter of the environment used by the current instance of elf_symbol.
const interned_string & get_cached_name(bool internal=false) const
Get the name of the current function_type.
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.
virtual size_t get_alignment_in_bits() const
Getter of the alignment of the class_or_union type.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
virtual ~function_decl()
Destructor of the function_decl type.
const vector< type_base_wptr > & get_types_sorted_by_name() const
Getter of all types types sorted by their pretty representation.
An abstraction helper for type declarations.
shared_ptr< method_type > method_type_sptr
Convenience typedef for shared pointer to method_type.
void add_member_type(type_base_sptr t)
Add a member type to the current instance of class_or_union.
void set_composed_type(type_base_sptr t)
Setter for the resulting composed type.
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.
vector< namespace_decl_sptr > namespaces_type
A convenience typedef for vectors of namespace_decl_sptr.
A comparison functor for pointers to var_decl.
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.
void set_cv_quals(CV cv_quals)
Setter of the const/value qualifiers bit field.
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
friend bool get_member_function_is_const(const function_decl &)
Test whether a member function is const.
const function_type_sptr get_type() const
Return the type of the current instance of function_decl.
void set_path(const string &)
Set the path associated to the current instance of translation_unit.
The base class of both types and declarations.
virtual ~union_decl()
Destructor of the union_decl type.
const location & get_location() const
Get the location of a given 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 "AND" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
A declaration that introduces a scope.
Definition of the private data of type_base.
The hashing functor for member_function_template.
Hasher for the class_or_union type.
const environment & get_environment() const
Getter of the environment of the current translation_unit.
Abstracts a reference type.
bool operator<(const location &other) const
"Less than" operator of the location type.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual size_t get_hash() const
Return the hash value for the current instance.
void set_temporary_qualified_name(const interned_string &) const
Setter for the temporary qualified name of the current declaration.
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...
virtual size_t get_num_anonymous_member_enums() const
Get the number of anonymous member enums contained in this class.
void set_visibility(visibility v)
Setter for the visibility of the decl.
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.
The abstraction of a qualified type.
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 ...
access_specifier get_member_access_specifier(const decl_base &d)
Gets the access specifier for a class member.
A hashing functor for a function_decl::parameter.
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.
bool get_is_artificial() const
Test if the location is artificial.
Abstraction of a base specifier in a class declaration.
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...
friend decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
bool get_is_virtual() const
Getter of the "is-virtual" proprerty of the base class specifier.
friend void remove_decl_from_scope(decl_base_sptr decl)
Remove a given decl from its scope.
friend void set_member_function_is_ctor(function_decl &, bool)
Setter for the is_ctor property of the member function.
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.
The base class of templates.
This is the abstraction of the set of relevant artefacts (types, variable declarations, functions, templates, etc) bundled together into a translation unit.
void sort_types(const canonical_type_sptr_set_type &types, vector< type_base_sptr > &result)
Sort types in a hopefully stable manner.
virtual ~class_decl()
Destructor of the class_decl type.
virtual ~enum_type_decl()
Destructor for the enum type declaration.
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...
void set_translation_unit(translation_unit *)
Set the translation_unit this ABI artifact belongs to.
virtual bool traverse(ir_node_visitor &v)
Traverse a given IR node and its children, calling an visitor on each node.
enumerator()
Default constructor of the enum_type_decl::enumerator type.
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_...
method_decl * is_method_decl(const type_or_decl_base *d)
Test if a function_decl is actually a method_decl.
shared_ptr< function_decl > get_pattern() const
Get the pattern of the function template.
virtual ~environment()
Destructor for the environment type.
friend type_base * is_type(const type_or_decl_base *)
Test whether a declaration is a type.
virtual ~method_type()
The destructor of method_type.
bool has_other_common_instances() const
Return true if this common common symbol has other common instances.
std::set< translation_unit_sptr, shared_translation_unit_comp > translation_units
Convenience typedef for an ordered set of translation_unit_sptr.
const type_base_sptr get_composed_type() const
Getter for the resulting composed type.
virtual bool operator==(const decl_base &) const
Equality operator of the reference_type_def type.
string as_string() const
Return a string representation of the sub range.
friend bool get_data_member_is_laid_out(const var_decl &m)
Test whether a data member is laid out.
A functor to hash instances of interned_string.
const type_base_sptrs_type & get_member_types() const
Get the member types of this scope_decl.
bool type_node_has_been_visited(type_base *) const
Test if a given type node has been marked as visited.
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...
parameters::const_iterator get_first_non_implicit_parm() const
Get the first parameter of the function.
const string get_type_pretty_representation() const
bool operator()(const function_decl *l, const function_decl *r) const
Tests if two pointers to function_decl are equal.
shared_ptr< scope_decl > global_scope_sptr
Convenience typedef for a shared pointer on a global_scope.
shared_ptr< context_rel > context_rel_sptr
A convenience typedef for shared pointers to context_rel.
Abstracts the type of a class member function.
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
const interned_string & get_qualified_parent_name() const
Return a copy of the qualified name of the parent of the current decl.
bool operator!=(const translation_unit_sptr &l, const translation_unit_sptr &r)
A deep inequality operator for pointers to translation units.
bool do_on_the_fly_canonicalization() const
Getter for the "on-the-fly-canonicalization" flag.
int get_number_of_aliases() const
Get the number of aliases to this elf symbol.
void set_type(type t)
Setter for the type of the current instance of elf_symbol.
string get_cv_quals_string_prefix() const
Compute and return the string prefix or suffix representing the qualifiers hold by the current instan...
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
Abstraction of the declaration of a method.
const type_base_sptr & get_containing_type() const
Getter of the type containing the member pointed-to by the current ptr_to_mbr_type.
const type_base_sptr get_type() const
Getter for the type of the template parameter.
bool decl_only_class_equals_definition() const
Getter of the "decl-only-class-equals-definition" flag.
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.
The interface for types which are feeling social and want to be visited during the traversal of a hie...
std::vector< decl_base_sptr > declarations
Convenience typedef for a vector of decl_base_sptr.
void set_compilation_dir_path(const std::string &)
Set the path of the directory that was 'current' when the translation unit was compiled.
const declarations & get_member_decls() const
Getter for the member declarations carried by the current scope_decl.
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
Abstracts a class declaration.
const interned_string & get_name() const
Getter for the name of the current decl.
const corpus * get_corpus() const
Get the corpus this translation unit is a member of.
shared_ptr< typedef_decl > typedef_decl_sptr
Convenience typedef for a shared pointer on a typedef_decl.
type_base_sptr get_underlying_type() const
Getter of the underlying type.
const string & get_name() const
Getter for the name of the elf_symbol.
The base class for the visitor type hierarchy used for traversing a hierarchy of nodes.
change_kind
A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal ...
virtual bool operator!=(const type_base &) const
Return true if both types equals.
The abstraction of the relationship between an entity and its containing scope (its context)...
unordered_set< uintptr_t > pointer_set
A convenience typedef for an unordered set of pointer values.
const member_functions & get_virtual_mem_fns() const
Get the virtual member functions of this class.
bool is_empty_or_has_empty_sub_namespaces() const
Test if the current namespace_decl is empty or contains empty namespaces itself.
CV get_cv_quals() const
Getter of the const/volatile qualifier bit field.
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 ...
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...
bool is_variadic() const
Test if the current instance of function_type is for a variadic function.
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...
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...
bool is_suppressed() const
Getter for the 'is-suppressed' property.
var_decl_sptr clone() const
Create a new var_decl that is a clone of the current one.
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.
virtual size_t get_hash() const
Get the hash of a decl. If the hash hasn't been computed yet, compute it ans store its value; otherwi...
Abstraction of a member function context relationship. This relates a member function to its parent c...
const context_rel * get_context_rel() const
Getter for the context relationship.
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 type_base &) const
Return true if both types equals.
void vtable_offset(size_t s)
Setter for the vtable offset property.
canonical_types_map_type & get_canonical_types_map()
Getter the map of canonical types.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of function_decl.
void set_is_suppressed(bool is_suppressed)
Setter for the 'is-suppressed' property.
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.
bool hashing_started() const
Getter for the 'hashing_started' property.
bool operator!=(const enumerator &other) const
Inequality operator.
virtual bool operator==(const decl_base &) const
Equality operator between two scope_type_decl.
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.
std::ostream & operator<<(std::ostream &o, elf_symbol::type t)
Serialize an instance of symbol_type and stream it to a given output stream.
const std::string & get_absolute_path() const
Get the concatenation of the build directory and the relative path of the translation unit...
class_or_union_sptr get_class_type() const
Get the class type this method belongs to.
The comparison functor for using instances of type_or_decl_base as values in a hash map or set...
unordered_map< string, method_decl_sptr > string_mem_fn_sptr_map_type
Convenience typedef.
function_decl::parameter * is_function_parameter(const type_or_decl_base *tod)
Test whether a declaration is a function_decl.
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.
Abstracts a variable declaration.
virtual void remove_member_decl(decl_base_sptr)
Remove a given decl from the current class_or_union scope.
vector< type_base_sptr > member_types
Convenience typedef.
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.
virtual void set_size_in_bits(size_t)
Setter of the size of the class_or_union type.
void set_index(size_t)
Setter for the index.
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 bool operator==(const decl_base &) const
Comparison operator for class_decl.
virtual size_t get_num_anonymous_member_unions() const
Get the number of anonymous member unions contained in this class.
Abstract a class template.
Abstraction of a function parameter.
virtual size_t get_hash() const
The virtual implementation of 'get_hash' for a function_decl.
virtual bool operator==(const decl_base &) const
Return true iff both namespaces and their members are equal.
friend uint64_t get_data_member_offset(const var_decl_sptr m)
Get the offset of a data member.
void set_name(const string &n)
Setter for the name of the decl.
void remove_member_type(type_base_sptr t)
Remove a member type from the current class_or_union scope.
void set_class_type(const class_or_union_sptr &t)
Sets the class type of the current instance of method_type.
const type_base_sptr & get_member_type() const
Getter of the member type of the current ptr_to_mbr_type.
size_t operator()(const type_or_decl_base *artifact) const
Function-call Operator to hash the string representation of an ABI artifact.
The private data of the environment type.
virtual size_t get_hash() const
Get the hash value of the current instance.
Abstract a member function template.
interned_string get_name_id() const
Get a name uniquely identifying the parameter in the function.
language get_language() const
Getter of the language of the source code of the translation unit.
binding get_binding() const
Getter of the binding of the variable.
std::vector< elf_symbol_sptr > elf_symbols
Convenience typedef for a vector of elf_symbol.
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.
access_specifier get_access_specifier() const
Getter for the access specifier of this member.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build a pretty representation for an array_type_def::subrange_type.
bool operator!=(const template_parameter &) const
Inequality operator.
static string vector_as_string(const vector< subrange_sptr > &)
Return a string representation of a vector of subranges.
bool get_is_static() const
Abstracts a type template parameter.
bool elf_symbol_is_function(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
interned_string get_id() const
Return an ID that tries to uniquely identify the variable inside a program or a library.
shared_ptr< class_decl > get_pattern() const
Getter of the pattern of the template.
var_decl * is_var_decl(const type_or_decl_base *tod)
Tests if a declaration is a variable declaration.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation for the virtual qualified name builder for qualified_type_def.
corpus::origin operator&=(corpus::origin &l, corpus::origin r)
Bitwise &= operator for the corpus::origin type.
virtual size_t get_hash() const
Calculate the hash value for a class_decl::base_spec.
const decl_base_sptr get_earlier_declaration() const
If this decl_base is a definition, get its earlier declaration.
std::vector< enumerator > enumerators
Convenience typedef for a list of enumerator.
virtual void set_size_in_bits(size_t)
Setter for the size of the type.
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...
class_decl::base_spec * is_class_base_spec(const type_or_decl_base *tod)
Test if an ABI artifact is a class base specifier.
virtual size_t get_hash() const
Get the hash of a decl. If the hash hasn't been computed yet, compute it ans store its value; otherwi...
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build a pretty representation for a typedef_decl.
virtual bool operator==(const decl_base &) const
Comparison operator for class_decl::base_spec.
void set_anonymous_data_member(var_decl *)
Set the containing anonymous data member of this data member context relationship. That means that the data member this relation belongs to is part of an anonymous data member.
const environment & get_environment() const
Getter of the environment of the current ABI artifact.
void insert_member_type(type_base_sptr t, declarations::iterator before)
Insert a member type.
virtual size_t get_num_anonymous_member_enums() const
Getter for the number of anonymous enums contained in this scope.
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 std::string & get_compilation_dir_path() const
Get the path of the directory that was 'current' when the translation unit was compiled.
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.
vector< type_base_sptr > type_base_sptrs_type
Helper typedef for a vector of shared pointer to a type_base.
const data_members & get_non_static_data_members() const
Get the non-static data memebers of this class_or_union.
Private type to hold private members of translation_unit.
virtual bool operator==(const type_base &) const
Equality operator.
Abstracts a declaration for an enum type.
bool operator()(const translation_unit_sptr &lhs, const translation_unit_sptr &rhs) const
Compare two translations units based on their absolute paths.
bool get_is_declaration_only() const
Test if a decl_base is a declaration-only decl.
const member_functions & get_member_functions() const
Get the member functions of this class_or_union.
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...
This class is to hold the value of the bound of a subrange. The value can be either signed or unsigne...
Toplevel namespace for libabigail.
const type_base_sptr & get_void_type() const
Get the unique type_decl that represents a "void" type for the current environment. This node must be the only one representing a void type in the system.
bool get_is_artificial() const
Getter of the flag that says if the artefact is artificial.
Hasher for the scope_decl type.
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.
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.
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.
shared_ptr< scope_decl > scope_decl_sptr
Convenience typedef for a shared pointer on a scope_decl.
bool is_main_symbol() const
Tests whether this symbol is the main symbol.
const type_base_sptrs_type & get_sorted_member_types() const
Get the sorted member types of this scope_decl.
void set_pointed_to_type(type_base_sptr &pointed_to_type)
Setter of the pointed_to type of the current reference type.
bool is_destructor() const
Getter for the 'is-destructor' property.
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...
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
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...
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.
void set_signedness(enum signedness s)
Setter of the signedness (unsigned VS signed) of the bound value.
shared_ptr< function_decl::parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
enum_type_decl * get_enum_type() const
Getter for the enum type that this enumerator is for.
bool elf_symbol_is_variable(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
virtual ~template_decl()
Destructor.
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.
bool operator==(const translation_unit_sptr &l, const translation_unit_sptr &r)
A deep comparison operator for pointers to translation units.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
friend bool get_member_function_is_virtual(const function_decl &)
Test if a given member function is virtual.
virtual bool operator==(const decl_base &) const
Return true iff both scopes have the same names and have the same member decls.
virtual size_t get_alignment_in_bits() const
Return the alignment of the typedef.
virtual const interned_string & get_qualified_name(bool internal=false) const
Get the qualified name of a given variable or data member.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
const method_type_sptr get_type() const
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...
Abstracts a union type declaration.
void set_definition_of_declaration(const decl_base_sptr &)
Set the definition of this declaration-only decl_base.
shared_ptr< parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
virtual size_t get_size_in_bits() const
Getter for the size of the type.
The abstraction of a pointer-to-member type.
bool empty() const
Test if the type_maps is empty.
class_decl_sptr get_base_class() const
Get the base class referred to by the current base class specifier.
enum signedness get_signedness() const
Getter of the signedness (unsigned VS signed) of the bound value.
elf_symbol_sptr get_alias_from_name(const string &name) const
From the aliases of the current symbol, lookup one with a given name.
weak_ptr< elf_symbol > elf_symbol_wptr
A convenience typedef for a weak pointer to elf_symbol.
void clear_qualified_name()
Clear the qualified name of this decl.
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*.
void set_unsigned(uint64_t v)
Setter of the bound value as unsigned.
shared_ptr< function_tdecl > function_tdecl_sptr
Convenience typedef for a shared pointer on a function_tdecl.
friend void set_member_function_is_dtor(function_decl &, bool)
Set the destructor-ness property of a member function.
scope_decl * get_scope() const
Return the type containing the current decl, if any.
shared_ptr< base_spec > base_spec_sptr
Convenience typedef.
virtual void on_canonical_type_set()
This method is invoked automatically right after the current instance of class_decl has been canonica...
void set_corpus(corpus *)
Set the corpus this translation unit is a member of.
type_base_sptr get_return_type() const
Getter for the return type of the current instance of function_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...
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...
const parameters & get_parameters() const
Getter for the set of parameters of the current intance of function_type.
void set_is_in_ksymtab(bool is_in_ksymtab)
Setter of the 'is-in-ksymtab' property.
friend bool equals(const decl_base &, const decl_base &, change_kind *)
Compares two instances of decl_base.
size_t get_index() const
Getter for the index.
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 &o) const
Comparison operator for function_decl.
bool is_void_type(const type_base_sptr &) const
Test if a given type is a void type as defined in the current environment.
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...
void add_member_function_template(member_function_template_sptr)
Append a member function template to the class_or_union.
bool has_aliases() const
Check if the current elf_symbol has an alias.
Abstraction for a function declaration.
bool is_constructor() const
Getter for the 'is-constructor' property.
std::vector< scope_decl_sptr > scopes
Convenience typedef for a vector of scope_decl_sptr.
void append_parameter(parameter_sptr parm)
Append a new parameter to the vector of parameters of the current instance of function_type.
friend type_base_sptr canonicalize(type_base_sptr)
Compute the canonical type of a given type.
bool is_ada_language(translation_unit::language l)
Test if a language enumerator designates the Ada language.
virtual bool operator!=(const type_base &) const
Inequality operator.
bool is_struct() const
Test if the class is a struct.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
virtual size_t get_num_anonymous_member_classes() const
Getter for the number of anonymous classes contained in this scope.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
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 operator!=(const version &o) const
Inequality operator.
parameters::const_iterator get_first_non_implicit_parm() const
Getter for the first non-implicit parameter of a function decl.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current type.
bool is_defined() const
Test if the current instance of elf_symbol is defined or not.
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...
virtual bool operator==(const decl_base &) const
Equality operator for qualified types.
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.
const var_decl_sptr find_anonymous_data_member(const var_decl_sptr &) const
Find an anonymous data member in the class.
const interned_string & get_linkage_name() const
Getter for the mangled name.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation of the virtual "get_qualified_name" method.
The base type of class_decl and union_decl.
bool get_is_in_public_symbol_table() const
Test if the decl is defined in a ELF symbol table as a public symbol.
void set_is_anonymous(bool)
Set the "is_anonymous" flag of the current declaration.
type
The type of a symbol.
friend bool get_member_function_is_dtor(const function_decl &)
Test whether a member function is a destructor.
bool is_non_finite() const
Test if the length of the subrange type is infinite.
friend bool equals(const function_type &, const function_type &, change_kind *)
Compare two function types.
The source location of a token.
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(), this function ensures that the member function is added to the specific vectors and maps of virtual member function of its class.
The base of an entity of the intermediate representation that is to be traversed. ...
A hashing functor fo instances and pointers of function_decl.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
binding get_binding() const
Getter for the binding of the current instance of elf_symbol.
void set_location(const location &l)
Set the location for a given declaration.
unordered_map< ssize_t, member_functions > virtual_mem_fn_map_type
Convenience typedef.
The hashing functor for function_type.
type_base_sptr find_member_type(const string &name) const
Find a member type of a given name, inside the current scope_decl.
virtual bool operator==(const type_base &) const
Return true iff both type declarations are equal.
void set_upper_bound(int64_t ub)
Setter of the upper bound of the subrange type.
friend bool equals(const class_decl &, const class_decl &, change_kind *)
Compares two instances of class_decl.
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.
string translation_unit_language_to_string(translation_unit::language l)
Converts a translation_unit::language enumerator into a string.
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< type_decl > type_decl_sptr
Convenience typedef for a shared pointer on a type_decl.
Abstracts non type template parameters.
location get_location(const type_base_sptr &type)
Get the location of the declaration of a given type.
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_decls_alias(const function_decl &f1, const function_decl &f2)
Test if two function declarations are aliases.
virtual size_t get_hash() const
Return the hash value for the current instance.
This is a type that aggregates maps of all the kinds of types that are supported by libabigail...
type_base_sptr get_underlying_type() const
Getter of the underlying type of the typedef.
bool is_variadic_parameter_type(const type_base *) const
Test if a type is a variadic parameter type as defined in the current environment.
bool is_public() const
Test if the current instance of elf_symbol is public or not.
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(), this function ensures that the member function is added to the specific vectors and maps of virtual member function of its class.
bool get_is_const() const
Getter of the "is-const" property of method_type.
Abstraction of an elf symbol.
type_base * get_canonical_type(const char *name, unsigned index)
Get a given canonical type which has a given "string representation".
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
qualified_type_def_sptr lookup_qualified_type(const interned_string &type_name, const translation_unit &tu)
Lookup a qualified type from a translation unit.
virtual bool operator==(const decl_base &) const
Equality operator.
Abstract a function template declaration.
The abstraction for a data member context relationship. This relates a data member to its parent clas...
type_base * get_naked_pointed_to_type() const
Getter of a naked pointer to the pointed-to type.
translation_unit * get_translation_unit(const decl_base &decl)
Return the translation unit a declaration belongs to.
virtual void remove_member_decl(decl_base_sptr member)
Remove a declaration from the current scope.
vector< method_decl_sptr > member_functions
Convenience typedef.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_return_type(type_base_sptr t)
Setter of the return type of the current instance of function_type.
bool elf_symbols_alias(const elf_symbol &s1, const elf_symbol &s2)
Test if two symbols alias.
vector< type_base * > type_base_ptrs_type
Helper typedef for a vector of pointer to type_base.
void set_is_artificial(bool f)
Set the artificial-ness of the location.
bool operator==(const translation_unit &) const
Compare the current translation unit against another one.
void add_alias(const elf_symbol_sptr &)
Add an alias to the current elf symbol.
virtual ~decl_base()
Destructor of the decl_base type.
friend void set_data_member_offset(var_decl_sptr m, uint64_t o)
Set the offset of a data member into its containing class.
uint64_t get_length() const
Getter of the length of the subrange type.
shared_ptr< reference_type_def > reference_type_def_sptr
Convenience typedef for a shared pointer on a reference_type_def.
type_base_sptr get_underlying_type() const
Getter of the underlying type of the subrange, that is, the type that defines the range...
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_...
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_member_access_specifier(decl_base &d, access_specifier a)
Sets the access specifier for a class member.
Functor to hash a canonical type by using its pointer value.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse virtual function.
virtual bool operator==(const decl_base &) const
Equality operator.
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 ...
interned_string intern(const string &) const
Do intern a string.
void mark_type_node_as_visited(type_base *)
Mark a given type node as having been visited.
virtual bool traverse(ir_node_visitor &)
Traverses an instance of function_type, visiting all the sub-types and decls that it might contain...
location(const location &l)
Copy constructor of the location.
void set_signed(int64_t v)
Setter of the bound value as signed.
translation_unit::language get_language() const
Get the language of the array.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Get the qualified name for the current ptr_to_mbr_type.
string get_anon_dm_reliable_name(bool qualified=true) const
Get a name that is valid even for an anonymous data member.
bool operator!=(const translation_unit &) const
Inequality operator.
bool is_default() const
Getter for the 'is_default' property of the version.
Hash functor for instances of type_base.
location & operator=(const location &l)
Assignment operator of the location.
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.
function_decl_sptr clone() const
Create a new instance of function_decl that is a clone of the current one.
const std::vector< subrange_sptr > & get_subranges() const
Get the array's subranges.
bool is_cplus_plus_language(translation_unit::language l)
Test if a language enumerator designates the C++ language.
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...
Hasher for the non_type_tparameter type.
int64_t get_upper_bound() const
Getter of the upper bound of the subrange type.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
void set_binding(binding b)
Setter for the binding of the current instance of elf_symbol.
virtual void set_alignment_in_bits(size_t)
Setter of the alignment of the class type.
virtual size_t get_size_in_bits() const
Return the size of the typedef.
virtual bool operator==(const decl_base &) const
Comparison operator for union_decl.
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(), this function ensures that the member function is added to the specific vectors and maps of virtual member function of its class.
void sort_virtual_mem_fns()
Sort the virtual member functions by their virtual index.
void set_parameters(const parameters &p)
Setter for the parameters of the current instance of function_type.
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.
function_decl * is_function_decl(const type_or_decl_base *d)
Test whether a declaration is a function_decl.
const type_base_sptr get_type() const
Getter of the type of the variable.
void set_symbol(const elf_symbol_sptr &sym)
This sets the underlying ELF symbol for the current function decl.
const elf_symbol_sptr get_main_symbol() const
Get the main symbol of an alias chain.
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 ...
const declarations & get_sorted_member_decls() const
Getter for the sorted member declarations carried by the current scope_decl.
bool has_vtable() const
Test if the current instance has a vtable.
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
const abg_compat::optional< uint32_t > & get_crc() const
Getter of the 'crc' property.
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.
const abg_compat::optional< std::string > & get_namespace() const
Getter of the 'namespace' property.
bool operator==(const elf_symbol &) const
Test if two main symbols are textually equal, or, if they have aliases that are textually equal...
bool operator==(const enumerator &other) const
Equality operator.
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.
The abstraction of a pointer type.
friend enum access_specifier get_member_access_specifier(const decl_base &d)
Gets the access specifier for a class member.
binding
The binding of a symbol.
void set_access_specifier(access_specifier a)
Setter for the access specifier of this member.
shared_ptr< class_tdecl > class_tdecl_sptr
Convenience typedef for a shared pointer on a class_tdecl.
void forget_visited_type_nodes()
Un-mark all visited type nodes.
type_or_decl_kind
This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact...
void set_underlying_type(const type_base_sptr &)
Setter of the underlying type.
void set_earlier_declaration(const decl_base_sptr &)
set the earlier declaration of this decl_base definition.
void is_const(bool f)
Setter for the 'is-const' property.
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.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
corpus::origin operator|(corpus::origin l, corpus::origin r)
Bitwise | operator for the corpus::origin type.
visibility get_visibility() const
Getter for the visibility of the decl.
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.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Build and return the pretty representation of this variable.
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...
virtual size_t get_hash() const
Get the hash value for the current instance.
virtual bool operator==(const decl_base &) const
Return true iff the two decls have the same name.
bool is_function() const
Test if the current instance of elf_symbol is a function symbol or not.
long get_offset_in_bits() const
Getter of the offset of the base.
type_base_sptr get_canonical_type() const
Getter of the canonical type of the current instance of type_base.
virtual bool operator!=(const decl_base &) const
Inequality operator.
virtual size_t get_size_in_bits() const
Getter of the size of the class_or_union type.
void set_is_constructed(bool)
Setter of the 'is_constructed" flag. It says if the translation unit is fully constructed or not...
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
The base class for the visitor type hierarchy used for traversing a translation unit.
ssize_t get_biggest_vtable_offset() const
Get the highest vtable offset of all the virtual methods of the class.
bool operator==(const version &o) const
Compares the current version against another one.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
Equality functor for instances of function_decl.
const interned_string & peek_qualified_name() const
Getter for the qualified name.
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.
A basic type declaration that introduces no scope.
shared_ptr< enum_type_decl > enum_type_decl_sptr
Convenience typedef for shared pointer to a enum_type_decl.
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...
virtual bool traverse(ir_node_visitor &)
Traverse the the ABI artifact.
const config & get_config() const
Getter of the general configuration object.
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
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.
bool is_const() const
Getter for the 'is-const' property.
Hasher for the class_decl type.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Compute the qualified name of the decl.
const type_base_sptr get_return_type() const
int64_t get_signed_value() const
Getter of the bound value as a signed value.
const interned_string & peek_temporary_qualified_name() const
Getter of the temporary qualified name of the current declaration.
A hashing functor for instances and pointers of var_decl.
version & operator=(const version &o)
Assign a version to the current one.
class_decl_sptr find_base_class(const string &) const
Find a base class of a given qualified name for the current class.
virtual ~template_parameter()
Destructor.
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...
virtual size_t get_size_in_bits() const
Get the size of the qualified type def.
decl_base_sptr insert_member_decl(decl_base_sptr member)
Insert a data member to this class_or_union type.
version & get_version() const
Getter for the version of the current instanc of elf_symbol.
const std::list< template_parameter_sptr > & get_template_parameters() const
Get the list of template parameters of the current instance of template_decl.
friend void set_member_function_is_virtual(function_decl &, bool)
Set the virtual-ness of a member function.
const type_base_sptr get_element_type() const
Getter of the type of an array element.
bool operator()(const var_decl *l, const var_decl *r) const
Return true if the two instances of var_decl are equal.
Hasher for the type_composition type.
The base class for member types, data members and member functions. Its purpose is mainly to carry th...
const enumerators & get_enumerators() const
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...
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...
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...
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Compute the qualified name of the parameter.
const translation_unit * get_translation_unit() const
Get the translation_unit this ABI artifact belongs to.
language
The language of the translation unit.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_is_const(bool)
Setter of the "is-const" property of method_type.
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 ...
const string & get_qualified_name(bool internal=false) const
Getter for the qualified name of the current instance of enum_type_decl::enumerator. The first invocation of the method builds the qualified name, caches it and return a reference to the cached qualified name. Subsequent invocations just return the cached value.
virtual bool operator==(const decl_base &) const
Equality operator.
void maybe_fixup_members_of_anon_data_member(var_decl_sptr &anon_dm)
Fixup the members of the type of an anonymous data member.
type_base_sptr get_underlying_type() const
Return the underlying type of the enum.
void set_enum_type(enum_type_decl *)
Setter for the enum type that this enumerator is for.
void set_naming_typedef(const typedef_decl_sptr &)
Set the naming typedef of the current instance of decl_base.
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.
location()
Default constructor for the location type.
void set_artificial_location(const location &)
Setter of the artificial location of the artificat.
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...
corpus::origin operator|=(corpus::origin &l, corpus::origin r)
Bitwise |= operator for the corpus::origin type.
integral_type::modifiers_type operator~(integral_type::modifiers_type l)
Bitwise one's complement operator for integral_type::modifiers_type.
virtual bool operator==(const decl_base &) const
Comparison operator of var_decl.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
void set_is_static(bool f)
Set a flag saying if the parameter is static or not.
void set_size(size_t)
Setter of the size of the symbol.
void set_binding(binding b)
Setter of the binding of the variable.
This means that a given IR artifact has a local type change.
friend ssize_t get_member_function_vtable_offset(const function_decl &)
Get the vtable offset of a member function.
This abstracts the global scope of a given translation unit.
bool has_virtual_bases() const
Test if the current instance of class_decl has at least one virtual base.
A comparison functor to compare translation units based on their absolute paths.
bool get_has_anonymous_parent() const
Get the "has_anonymous_parent" flag of the current declaration.
unordered_map< string, method_decl * > string_mem_fn_ptr_map_type
Convenience typedef.
vector< type_base_sptr > * get_canonical_types(const char *name)
Get the vector of canonical types which have a given "string representation".
const scope_decl_sptr & get_global_scope() const
Getter of the the global scope of the translation unit.
virtual bool operator==(const decl_base &) const
Equality operator.
friend class_decl * is_class_type(const type_or_decl_base *)
Test whether a type is a class.
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...
size_t get_size() const
Getter of the size of the symbol.
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.
A predicate for deep equality of instances of shared_ptr
virtual void set_scope(scope_decl *)
Setter of the scope of the current decl.
void set_pointed_to_type(const type_base_sptr &)
Set the pointed-to type of the pointer.
void set_language(language l)
Setter of the language of the source code of the translation unit.
bool find_iterator_for_member(const decl_base *, declarations::iterator &)
Find a member of the current scope and return an iterator on it.
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_...
The abstraction of an interned string.
A comparison functor to compare pointer to instances of type_or_decl_base.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
elf_symbol_sptr update_main_symbol(const std::string &)
Update the main symbol for a group of aliased symbols.
bool operator!=(const context_rel &o) const
Inequality operator.
bool get_is_anonymous() const
Test if the current declaration is anonymous.
virtual string get_pretty_representation(bool internal=false, bool qualified_name=true) const
Get the pretty representation of the current instance of type_decl.
virtual bool traverse(ir_node_visitor &)
Default implementation of traversal for types. This function does nothing. It must be implemented by ...
string get_string_representation_of_cv_quals(const qualified_type_def::CV cv_quals)
Get the string representation of a CV qualifier bitmap.
std::vector< subrange_sptr > subranges_type
Convenience typedef for a vector of subrange_sptr.
elf_symbol_sptr get_next_alias() const
Get the next alias of the current symbol.
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...
friend void set_member_access_specifier(decl_base &d, access_specifier a)
Sets the access specifier for a class member.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Implementation for the virtual qualified name builder for type_decl.
Abstraction for an array range type, like in Ada, or just for an array dimension like in C or C++...
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
const type_maps & get_types() const
Getter of the types of the current translation_unit.
size_t vtable_offset() const
Getter for the vtable offset property.
virtual const interned_string & get_scoped_name() const
Return the scoped name of the decl.
void set_underlying_type(const type_base_sptr &)
Setter ofthe underlying type of the typedef.
ir_node_visitor()
Default Constructor of the ir_node_visitor type.
The abstraction of the version of an ELF symbol.
virtual bool operator==(const type_base &) const
Equality operator for function_type.
const type_base_sptrs_type & get_sorted_canonical_types() const
Return a vector of sorted canonical types of the current scope.
const std::string & get_path() const
Get the path of the current translation unit.
virtual size_t get_num_anonymous_member_classes() const
Get the number of anonymous member classes contained in this class.
size_t operator()(const type_or_decl_base_sptr &artifact) const
Function-call Operator to hash the string representation of an ABI artifact.
The hashing functor for class_decl::base_spec.
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...
bool is_empty() const
Test if the current scope is empty.
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.
void append_parameters(std::vector< parameter_sptr > &parms)
Append a vector of parameters to the type of this function.
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...
The hashing functor for member_class_template.
bound_value()
Default constructor of the array_type_def::subrange_type::bound_value class.
The hashing functor for using instances of type_or_decl_base as values in a hash map or set...
friend void set_member_function_vtable_offset(function_decl &, ssize_t)
Set the vtable offset of a member function.
const data_members & get_data_members() const
Get the data members of this class_or_union.
Abstracts a template template parameter.
void set_symbol(const elf_symbol_sptr &sym)
Sets the underlying ELF symbol for the current variable.
This type abstracts the configuration information of the library.
bool operator()(const type_or_decl_base_sptr &f, const type_or_decl_base_sptr &s)
Comparison operator for ABI artifacts.
This means that a given IR artifact has a local non-type change. That is a change that is carried by ...
bool is_in_ksymtab() const
Getter of the 'is-in-ksymtab' property.
bool has_artificial_location() const
Test if the current ABI artifact carries an artificial location.
void set_is_artificial(bool)
Setter of the flag that says if the artefact is artificial.
void set_name(const string &n)
Setter for the name of the current intance of elf_symbol.
vector< var_decl_sptr > data_members
Convenience typedef.
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.
friend bool equals(const class_or_union &, const class_or_union &, change_kind *)
Compares two instances of class_or_union.
location & get_artificial_location() const
Getter of the artificial location of the artifact.
void set_value(int64_t v)
Setter for the value of enum_type_decl::enumerator.
access_specifier
Access specifier for class members.
void set_visibility(visibility v)
Setter of the visibility of the current instance of elf_symbol.
void set_namespace(const abg_compat::optional< std::string > &ns)
Setter of the 'namespace' property.
environment()
Default constructor of the environment type.
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...
shared_ptr< template_decl > template_decl_sptr
Convenience typedef for a shared pointer to template_decl.
void is_constructor(bool f)
Setter for the 'is-constructor' property.
void append_parameter(parameter_sptr parm)
Append a parameter to the type of this function.
virtual ~ptr_to_mbr_type()
Desctructor for ptr_to_mbr_type.
type_base * get_naked_canonical_type() const
Getter of the canonical type pointer.
void set_element_type(const type_base_sptr &element_type)
Setter of the type of array element.
const decl_base * get_naked_definition_of_declaration() const
If this decl_base is declaration-only, get its definition, if any.
void set_type(type_base_sptr &)
Setter of the type of the variable.
bool operator==(const bound_value &) const
Equality operator of the bound value.
virtual bool operator==(const decl_base &o) const
Equality operator.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
const type_base * get_naked_type() const
Getter of the type of the variable.
const corpus * get_corpus() const
Get the corpus this ABI artifact belongs to.
The hashing functor for member_base.
type get_type() const
Getter for the type of the current instance of elf_symbol.
void set_name(const string &n)
Setter for the name of enum_type_decl::enumerator.
friend void set_member_is_static(const decl_base_sptr &d, bool s)
Sets the static-ness property of a class member.
bool is_variadic() const
Return true iff the function takes a variable number of parameters.
const function_decl::parameter * get_function_parameter(const decl_base *fun, unsigned parm_index)
Get the function parameter designated by its index.
binding get_binding() const
Get the binding of the function template.
shared_ptr< template_parameter > template_parameter_sptr
Convenience typedef for shared pointer to template parameter.
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.
bool equals(const decl_base &l, const decl_base &r, change_kind *k)
Compares two instances of decl_base.
corpus::origin operator&(corpus::origin l, corpus::origin r)
Bitwise & operator for the corpus::origin type.
virtual bool traverse(ir_node_visitor &v)
This implements the ir_traversable_base::traverse pure virtual function.
The abstraction of a typedef declaration.
virtual bool operator==(const decl_base &) const
Return true iff both scopes have the same names and have the same member decls.
friend void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
This abstracts a composition of types based on template type parameters. The result of the compositio...
friend bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
const string & get_id_string() const
Get a string that is representative of a given elf_symbol.
const type_base_sptr get_pointed_to_type() const
Getter of the pointed-to type.
vector< base_spec_sptr > base_specs
Convenience typedef.
virtual bool traverse(ir_node_visitor &)
This implements the ir_traversable_base::traverse pure virtual function.
shared_ptr< string_elf_symbols_map_type > string_elf_symbols_map_sptr
Convenience typedef for a shared pointer to string_elf_symbols_map_type.
virtual bool traverse(ir_node_visitor &v)
Traverse the diff sub-tree under the current instance function_decl.
virtual size_t get_alignment_in_bits() const
Getter for the alignment of the type.
void is_destructor(bool f)
Setter for the 'is-destructor' property.
virtual size_t get_hash() const
Return the hash value for the current instance of scope_decl.
interned_string get_type_name() const
friend void set_member_function_is_virtual(function_decl &, bool)
Set the virtual-ness of a member function.
int64_t get_lower_bound() const
Getter of the lower bound of the subrange type.
void set_address_size(char)
Setter of the address size in this translation unit.
const type_base_sptr & get_variadic_parameter_type() const
Get a type_decl instance that represents a the type of a variadic function parameter. This node must be the only one representing a variadic parameter type in the system.
const function_type * get_naked_type() const
Fast getter of the type of the current instance of function_decl.
bool operator==(const location &other) const
Equality operator of the location type.
bool has_virtual_member_functions() const
Test if the current instance of class_decl has virtual member functions.
virtual void append_subranges(const std::vector< subrange_sptr > &subs)
Append subranges from the vector.
static string & get_variadic_parameter_type_name()
Getter of the name of the variadic parameter type.
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.
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.
Base class for a template parameter. Client code should use the more specialized type_template_parame...
string expand(void) const
Expand the location into a string.
void set_lower_bound(int64_t lb)
Setter of the lower bound.
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.
shared_ptr< subrange_type > subrange_sptr
Convenience typedef for a shared pointer on a function_decl::subrange.
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 ...
const var_decl * get_anonymous_data_member() const
Return a non-nil value if this data member context relationship has an anonymous data member...
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.
namespace_decl(const environment &env, const string &name, const location &locus, visibility vis=VISIBILITY_DEFAULT)
Constructor.
virtual void set_linkage_name(const string &)
Set the linkage name of the method.
bool equals_modulo_cv_qualifier(const array_type_def *l, const array_type_def *r)
Test if two variables are equals modulo CV qualifiers.
shared_ptr< pointer_type_def > pointer_type_def_sptr
Convenience typedef for a shared pointer on a pointer_type_def.
void set_crc(const abg_compat::optional< uint32_t > &crc)
Setter of the 'crc' property.
bool operator==(const ptr_to_mbr_type &) const
Equality operator for the current ptr_to_mbr_type.
friend bool get_member_function_is_ctor(const function_decl &)
Test whether a member function is a constructor.
unsigned get_value() const
Get the value of the location.
friend void remove_decl_from_scope(decl_base_sptr)
Remove a given decl from its scope.
string get_pretty_representation(diff *d)
Get a copy of the pretty representation of a diff node.
const decl_base_sptr get_definition_of_declaration() const
If this decl_base is declaration-only, get its definition, if any.
virtual bool operator==(const decl_base &) const
Return true iff both instances of pointer_type_def are equal.
bool does_alias(const elf_symbol &) const
Test if the current symbol aliases another one.
char get_address_size() const
Getter of the address size in this translation unit.
bool is_empty() const
Tests whether if the current translation unit contains ABI artifacts or not.
virtual bool is_non_finite() const
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 method_decl * find_member_function(const string &mangled_name) const
Find a method, using its linkage name as a key.
virtual bool operator==(const decl_base &) const
Comparison operator for the function_tdecl type.
void add_common_instance(const elf_symbol_sptr &)
Add a common instance to the current common elf symbol.
Abstraction of a function type.
enum type_or_decl_kind kind() const
Getter for the "kind" property of type_or_decl_base type.
string build_name(bool, bool internal=false) const
Build the name of the current instance of qualified type.
void set_pattern(class_decl_sptr p)
Setter of the pattern of the template.
friend uint64_t get_absolute_data_member_offset(const var_decl &m)
Get the absolute offset of a data member.
The entry point to manage locations.
method_decl_sptr find_member_function_sptr(const string &mangled_name)
Find a method, using its linkage name as a key.
void set_version(const version &v)
Setter for the version of the current instance of elf_symbol.
CV
Bit field values representing the cv qualifiers of the underlying type.
virtual ~type_or_decl_base()
The destructor of the type_or_decl_base type.
visibility
ELF visibility.
void add_base_specifier(shared_ptr< base_spec > b)
Add a base specifier to this class.
bool is_java_language(translation_unit::language l)
Test if a language enumerator designates the Java language.
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, defined as public (global or weak).
const var_decl_sptr find_data_member(const string &) const
Find a data member of a given name in the current class_or_union.
The abstraction of a namespace declaration.
const base_specs & get_base_specifiers() const
Get the base specifiers for this class.