23 #include <unordered_map>
96 using std::unordered_map;
113 size_t operator()(
const type_base_sptr& l)
const;
120 typedef unordered_set<type_base_sptr,
130 sort_types(
const canonical_type_sptr_set_type& types,
131 vector<type_base_sptr>& result);
151 std::unique_ptr<priv> priv_;
157 typedef std::unordered_map<string, std::vector<type_base_sptr> >
170 const type_base_sptr&
173 const type_base_sptr&
176 const type_base_sptr&
219 intern(
const string&)
const;
233 #ifdef WITH_DEBUG_SELF_COMPARISON
235 set_self_comparison_debug_input(
const corpus_sptr&
corpus);
238 get_self_comparison_debug_inputs(corpus_sptr& first_corpus,
239 corpus_sptr& second_corpus);
242 self_comparison_debug_is_on(
bool);
245 self_comparison_debug_is_on()
const;
248 #ifdef WITH_DEBUG_TYPE_CANONICALIZATION
250 debug_type_canonicalization_is_on(
bool flag);
253 debug_type_canonicalization_is_on()
const;
256 debug_die_canonicalization_is_on(
bool flag);
259 debug_die_canonicalization_is_on()
const;
266 #ifdef WITH_DEBUG_SELF_COMPARISON
267 const unordered_map<string, uintptr_t>&
268 get_type_id_canonical_type_map()
const;
270 unordered_map<string, uintptr_t>&
271 get_type_id_canonical_type_map();
273 const unordered_map<uintptr_t, string>&
274 get_pointer_type_id_map()
const;
276 unordered_map<uintptr_t, string>&
277 get_pointer_type_id_map();
280 get_type_id_from_pointer(uintptr_t ptr)
const;
283 get_type_id_from_type(
const type_base *ptr)
const;
286 get_canonical_type_from_type_id(
const char*)
const;
322 : value_(v), loc_manager_(m), is_artificial_(
false)
330 get_location_manager()
const
331 {
return loc_manager_;}
349 {
return is_artificial_;}
365 {is_artificial_ = f;}
372 loc_manager_(l.loc_manager_),
373 is_artificial_(l.is_artificial_)
383 loc_manager_ = l.loc_manager_;
384 is_artificial_ = l.is_artificial_;
390 : value_(), loc_manager_(), is_artificial_()
402 operator bool()
const
412 {
return value_ == other.value_;}
422 {
return value_ < other.value_;}
436 expand(std::string& path,
unsigned& line,
unsigned& column)
const;
451 std::unique_ptr<priv> priv_;
464 unsigned& line,
unsigned& column)
const;
503 return repr1 == repr2;
539 std::hash<string> do_hash;
540 return do_hash(repr);
576 typedef unordered_map<interned_string, type_base_wptr, hash_interned_string>
586 typedef unordered_map<interned_string,
590 typedef unordered_map<interned_string,
604 std::unique_ptr<priv> priv_;
687 const vector<type_base_wptr>&
697 std::unique_ptr<priv> priv_;
770 const std::string& path,
771 char address_size = 0);
820 const vector<function_type_sptr>&
857 lookup_function_type_in_translation_unit(
const function_type& t,
864 friend type_base_sptr
883 {
return lhs->get_absolute_path() < rhs->get_absolute_path();}
910 operator==(
const translation_unit_sptr&,
const translation_unit_sptr&);
913 operator!=(
const translation_unit_sptr&,
const translation_unit_sptr&);
933 typedef std::unordered_map<string, elf_symbol_sptr>
938 typedef shared_ptr<string_elf_symbol_sptr_map_type>
946 typedef std::unordered_map<string, elf_symbols>
989 PROTECTED_VISIBILITY,
999 std::unique_ptr<priv> priv_;
1018 elf_symbol(
const elf_symbol&);
1021 operator=(
const elf_symbol& s);
1025 static elf_symbol_sptr
1026 create(
const environment& e,
1039 bool is_suppressed =
false);
1125 const elf_symbol_sptr
1171 get_alias_with_default_symbol_version()
const;
1175 bool include_symbol_itself =
true)
const;
1217 operator==(
const elf_symbol_sptr& lhs,
const elf_symbol_sptr& rhs);
1220 operator!=(
const elf_symbol_sptr& lhs,
const elf_symbol_sptr& rhs);
1226 compute_aliases_for_elf_symbol(
const elf_symbol& symbol,
1228 vector<elf_symbol_sptr>& alias_set);
1234 std::unique_ptr<priv> priv_;
1246 operator const string&()
const;
1252 str(
const string& s);
1317 get_access_specifier()
const
1325 get_is_static()
const
1326 {
return is_static_;}
1329 set_is_static(
bool s)
1339 return (access_ == o.access_
1340 && is_static_ == o.is_static_);
1352 {
return !operator==(o);}
1408 type_or_decl_base();
1409 type_or_decl_base(
const type_or_decl_base&);
1419 ABSTRACT_TYPE_OR_DECL,
1420 ABSTRACT_DECL_BASE = 1,
1421 ABSTRACT_SCOPE_DECL = 1 << 1,
1422 GLOBAL_SCOPE_DECL = 1 << 2,
1423 NAMESPACE_DECL = 1 << 3,
1425 FUNCTION_DECL = 1 << 5,
1426 FUNCTION_PARAMETER_DECL = 1 << 6,
1427 METHOD_DECL = 1 << 7,
1428 TEMPLATE_DECL = 1 << 8,
1429 ABSTRACT_TYPE_BASE = 1 << 9,
1430 ABSTRACT_SCOPE_TYPE_DECL = 1 << 10,
1431 BASIC_TYPE = 1 << 11,
1432 SUBRANGE_TYPE = 1 << 12,
1433 QUALIFIED_TYPE = 1 << 13,
1434 POINTER_TYPE = 1 << 14,
1435 REFERENCE_TYPE = 1 << 15,
1436 POINTER_TO_MEMBER_TYPE = 1 << 16,
1437 ARRAY_TYPE = 1 << 17,
1438 ENUM_TYPE = 1 << 18,
1439 TYPEDEF_TYPE = 1 << 19,
1440 CLASS_TYPE = 1 << 20,
1441 UNION_TYPE = 1 << 21,
1442 FUNCTION_TYPE = 1 << 22,
1443 METHOD_TYPE = 1 << 23,
1472 set_hash_value(hash_t)
const;
1475 operator=(
const type_or_decl_base&);
1478 mutable std::unique_ptr<priv> priv_;
1523 bool qualified_name =
true)
const = 0;
1545 is_type(
const type_or_decl_base*);
1548 is_decl(
const type_or_decl_base* d);
1553 template<
typename T>
1575 operator==(
const type_or_decl_base&,
const type_or_decl_base&);
1578 operator==(
const type_or_decl_base_sptr&,
const type_or_decl_base_sptr&);
1581 operator!=(
const type_or_decl_base_sptr&,
const type_or_decl_base_sptr&);
1593 const interned_string&
1602 const interned_string&
1629 VISIBILITY_PROTECTED,
1655 const string& mangled_name =
"",
1659 const interned_string& name,
1661 const interned_string& mangled_name = interned_string(),
1672 const interned_string&
1688 bool qualified_name =
true)
const;
1692 bool internal =
false)
const;
1694 virtual const interned_string&
1697 virtual const interned_string&
1712 virtual const interned_string&
1715 const interned_string&
1739 const interned_string&
1754 const decl_base_sptr
1760 const decl_base_sptr
1789 friend decl_base_sptr
1795 friend decl_base_sptr
1797 vector<shared_ptr<decl_base> >::iterator,
1831 operator==(
const decl_base_sptr&,
const decl_base_sptr&);
1834 operator!=(
const decl_base_sptr&,
const decl_base_sptr&);
1837 operator==(
const type_base_sptr&,
const type_base_sptr&);
1840 operator!=(
const type_base_sptr&,
const type_base_sptr&);
1855 std::unique_ptr<priv> priv_;
1869 virtual decl_base_sptr
1881 const string& name,
const location& locus,
1889 const canonical_type_sptr_set_type&
1892 canonical_type_sptr_set_type&
1895 const type_base_sptrs_type&
1933 declarations::iterator before);
1944 const type_base_sptrs_type&
1947 const type_base_sptrs_type&
1958 friend decl_base_sptr
1961 friend decl_base_sptr
1963 scope_decl::declarations::iterator before,
1993 {
return translation_unit_;}
2021 static type_base_sptr
2022 get_canonical_type_for(type_base_sptr);
2037 friend type_base_sptr
canonicalize(type_base_sptr,
bool,
bool);
2045 const interned_string&
2098 operator()(
const type_base_sptr l,
const type_base_sptr r)
const
2103 if (l.get() == r.get())
2129 size_t size_in_bits,
2130 size_t alignment_in_bits,
2132 const string& mangled_name =
"",
2158 bool internal =
false)
const;
2160 virtual const interned_string&
2165 bool qualified_name =
true)
const;
2190 size_t size_in_bits,
size_t alignment_in_bits,
2215 bool qualified_name =
true)
const;
2238 std::unique_ptr<priv> priv_;
2244 string build_name(
bool,
bool internal =
false)
const;
2258 CV_VOLATILE = 1 << 1,
2259 CV_RESTRICT = 1 << 2
2298 bool internal =
false)
const;
2300 virtual const interned_string&
2310 operator==(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2313 operator!=(
const qualified_type_def_sptr&,
const qualified_type_def_sptr&);
2339 bool qualified =
true,
bool internal =
false);
2341 qualified_type_def_sptr
2352 std::unique_ptr<priv> priv_;
2365 pointer_type_def(
const type_base_sptr& pointed_to_type,
size_t size_in_bits,
2366 size_t alignment_in_bits,
const location& locus);
2369 size_t alignment_in_bits,
const location& locus);
2386 const type_base_sptr
2395 virtual const interned_string&
2418 std::unique_ptr<priv> priv_;
2432 bool lvalue,
size_t size_in_bits,
2433 size_t alignment_in_bits,
const location& locus);
2436 size_t alignment_in_bits,
const location& locus);
2454 get_pointed_to_type()
const;
2461 bool internal =
false)
const;
2463 virtual const interned_string&
2468 bool qualified_name =
true)
const;
2487 std::unique_ptr<priv> priv_;
2498 const type_base_sptr& member_type,
2499 const type_base_sptr& containing_type,
2500 size_t size_in_bits,
2501 size_t alignment_in_bits,
2504 virtual const interned_string&
2510 const type_base_sptr&
2513 const type_base_sptr&
2527 bool internal =
false)
const;
2529 virtual const interned_string&
2550 std::unique_ptr<priv> priv_;
2576 std::unique_ptr<priv> priv_;
2593 UNSIGNED_SIGNEDNESS,
2625 const type_base_sptr& underlying_type,
2701 bool qualified_name =
true)
const;
2708 const std::vector<subrange_sptr>& subs,
2712 const std::vector<subrange_sptr>& subs,
2729 bool internal =
false)
const;
2731 virtual const interned_string&
2734 const type_base_sptr
2744 get_dimension_count()
const;
2751 bool qualified_name =
true)
const;
2754 get_subrange_representation()
const;
2762 const std::vector<subrange_sptr>&
2787 std::unique_ptr<priv> priv_;
2819 type_base_sptr underlying_type,
2821 const string& mangled_name =
"",
2849 bool qualified_name =
true)
const;
2883 std::unique_ptr<priv> priv_;
2891 enumerator(
const string& name, int64_t value);
2937 std::unique_ptr<priv> priv_;
2948 const type_base_sptr underlying_type,
2950 const string& mangled_name =
"",
2956 const string& mangled_name =
"",
2976 bool qualified_name =
true)
const;
2986 bool internal =
false)
const;
2988 virtual const interned_string&
3006 std::unique_ptr<priv> priv_;
3013 size_t offset_in_bits,
3020 get_is_laid_out()
const;
3023 set_is_laid_out(
bool f);
3026 get_offset_in_bits()
const;
3029 set_offset_in_bits(
size_t o);
3070 std::unique_ptr<priv> priv_;
3084 type_base_sptr type,
3086 const string& mangled_name,
3093 const type_base_sptr
3111 const elf_symbol_sptr&
3120 virtual const interned_string&
3125 bool qualified_name =
true)
const;
3194 bool declared_inline,
3196 const string& mangled_name,
3201 type_base_sptr fn_type,
3202 bool declared_inline,
3204 const string& mangled_name =
"",
3206 binding bind = BINDING_GLOBAL);
3210 bool qualified_name =
true)
const;
3215 const std::vector<parameter_sptr >&
3224 parameters::const_iterator
3233 const type_base_sptr
3242 const elf_symbol_sptr&
3252 get_binding()
const;
3304 const type_or_decl_base *s)
3317 return l_repr < r_repr;
3329 const type_or_decl_base_sptr& s)
3337 std::unique_ptr<priv> priv_;
3345 bool variadic_marker =
false);
3351 bool variadic_marker,
3352 bool is_artificial);
3357 bool variadic_marker =
false,
3358 bool is_artificial =
false);
3362 bool variadic_marker =
false);
3366 const type_base_sptr
3382 set_index(
unsigned i);
3385 get_variadic_marker()
const;
3398 bool internal =
false)
const;
3402 bool qualified_name =
true)
const;
3435 std::unique_ptr<priv> priv_;
3443 const parameters& parms,
3444 size_t size_in_bits,
3445 size_t alignment_in_bits);
3448 size_t size_in_bits,
3449 size_t alignment_in_bits);
3452 size_t size_in_bits,
3453 size_t alignment_in_bits);
3467 const parameter_sptr
3479 parameters::const_iterator
3482 parameters::const_iterator
3485 const interned_string&
3493 bool qualified_name =
true)
const;
3508 std::unique_ptr<priv> priv_;
3518 class_or_union_sptr class_type,
3519 const std::vector<function_decl::parameter_sptr>& parms,
3521 size_t size_in_bits,
3522 size_t alignment_in_bits);
3525 type_base_sptr class_type,
3526 const std::vector<function_decl::parameter_sptr>& parms,
3528 size_t size_in_bits,
3529 size_t alignment_in_bits);
3533 size_t size_in_bits,
3534 size_t alignment_in_bits);
3537 size_t size_in_bits,
3538 size_t alignment_in_bits);
3559 bool qualified_name =
true)
const;
3561 friend interned_string
3569 std::unique_ptr<priv> priv_;
3583 const std::list<template_parameter_sptr>&
3601 std::unique_ptr<priv> priv_;
3621 get_enclosing_template_decl()
const;
3630 std::unique_ptr<priv> priv_;
3664 std::unique_ptr<priv> priv_;
3676 type_base_sptr type,
3684 const type_base_sptr
3697 std::unique_ptr<priv> priv_;
3732 std::unique_ptr<priv> priv_;
3739 type_base_sptr composed_type);
3741 const type_base_sptr
3754 std::unique_ptr<priv> priv_;
3783 shared_ptr<function_decl>
3799 std::unique_ptr<priv> priv_;
3825 shared_ptr<class_decl>
3852 : access_(a), is_static_(is_static)
3872 {
return is_static_;}
3896 bool declared_inline,
const location& locus,
3897 const string& mangled_name =
"",
3899 binding bind = BINDING_GLOBAL);
3903 bool declared_inline,
3905 const string& mangled_name =
"",
3907 binding bind = BINDING_GLOBAL);
3909 method_decl(
const string& name, type_base_sptr type,
3910 bool declared_inline,
const location& locus,
3911 const string& mangled_name =
"",
3913 binding bind = BINDING_GLOBAL);
3925 {function_decl::set_type(fn_type);}
3946 get_member_function_is_static(
const function_decl&);
3949 set_member_function_is_static(
const function_decl&,
bool);
3970 operator==(
const method_decl_sptr& l,
const method_decl_sptr& r);
3973 operator!=(
const method_decl_sptr& l,
const method_decl_sptr& r);
3988 virtual decl_base_sptr
4015 size_t size_in_bits,
size_t align_in_bits,
4017 member_types& mbrs, data_members& data_mbrs,
4018 member_functions& member_fns);
4021 size_t size_in_bits,
size_t align_in_bits,
4025 bool is_declaration_only =
true);
4053 bool is_laid_out,
bool is_static,
4054 size_t offset_in_bits);
4077 bool is_static,
bool is_ctor,
4078 bool is_dtor,
bool is_const);
4084 size_t vtable_offset,
4085 bool is_static,
bool is_ctor,
4086 bool is_dtor,
bool is_const);
4088 const member_functions&
4109 const member_function_templates&
4115 const member_class_templates&
4135 friend method_decl_sptr
4139 friend method_decl_sptr
4141 const method_decl_sptr& m);
4143 friend var_decl_sptr
4147 friend var_decl_sptr
4167 operator==(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4170 operator!=(
const class_or_union_sptr& l,
const class_or_union_sptr& r);
4181 insert_member_decl(decl_base_sptr member);
4216 size_t size_in_bits,
size_t align_in_bits,
4223 size_t size_in_bits,
size_t align_in_bits,
4230 size_t size_in_bits,
size_t align_in_bits,
4234 size_t size_in_bits,
size_t align_in_bits,
4239 bool is_declaration_only =
true);
4246 bool qualified_name =
true)
const;
4304 friend var_decl_sptr
4325 const method_decl_sptr& f);
4366 std::unique_ptr<priv> priv_;
4377 long offset_in_bits = -1,
bool is_virtual =
false);
4380 long offset_in_bits = -1,
bool is_virtual =
false);
4431 size_t size_in_bits,
const location& locus,
4436 size_t size_in_bits,
const location& locus,
4442 size_t size_in_bits,
const location& locus,
4446 size_t size_in_bits,
const location& locus,
4450 bool is_declaration_only =
true);
4457 bool qualified_name =
true)
const;
4482 const method_decl_sptr& f);
4489 operator==(
const union_decl_sptr& l,
const union_decl_sptr& r);
4492 operator!=(
const union_decl_sptr& l,
const union_decl_sptr& r);
4500 ssize_t vtable_offset_in_bits_;
4501 bool is_constructor_;
4502 bool is_destructor_;
4509 vtable_offset_in_bits_(-1),
4510 is_constructor_(
false),
4511 is_destructor_(
false),
4518 vtable_offset_in_bits_(-1),
4519 is_constructor_(
false),
4520 is_destructor_(
false),
4529 size_t vtable_offset_in_bits,
4533 is_virtual_(is_virtual),
4534 vtable_offset_in_bits_(vtable_offset_in_bits),
4535 is_constructor_(is_constructor),
4536 is_destructor_(is_destructor),
4542 {
return is_virtual_;}
4545 is_virtual(
bool is_virtual)
4546 {is_virtual_ = is_virtual;}
4556 {
return vtable_offset_in_bits_;}
4566 {vtable_offset_in_bits_ = s;}
4576 {
return is_constructor_;}
4584 {is_constructor_ = f;}
4593 {
return is_destructor_;}
4601 {is_destructor_ = f;}
4635 const char* dm_name);
4639 const var_decl_sptr& dm);
4648 bool is_constructor_;
4650 shared_ptr<function_tdecl> fn_tmpl_;
4661 bool is_constructor,
bool is_const)
4662 : type_or_decl_base(f->get_environment()),
4664 member_base(access, is_static), is_constructor_(is_constructor),
4665 is_const_(is_const), fn_tmpl_(f)
4669 is_constructor()
const
4670 {
return is_constructor_;}
4680 as_function_tdecl()
const
4691 operator==(
const member_function_template_sptr& l,
4692 const member_function_template_sptr& r);
4695 operator!=(
const member_function_template_sptr& l,
4696 const member_function_template_sptr& r);
4703 shared_ptr<class_tdecl> class_tmpl_;
4715 : type_or_decl_base(c->get_environment()),
4722 {
return *class_tmpl_; }
4725 as_class_tdecl()
const
4726 {
return class_tmpl_;}
4742 operator==(
const member_class_template_sptr& l,
4743 const member_class_template_sptr& r);
4746 operator!=(
const member_class_template_sptr& l,
4747 const member_class_template_sptr& r);
4813 std::unique_ptr<priv> priv_;
4872 virtual bool visit_begin(
var_decl*);
4875 virtual bool visit_begin(function_decl*);
4876 virtual bool visit_end(function_decl*);
4908 fns_to_str(vector<function_decl*>::const_iterator a_begin,
4909 vector<function_decl*>::const_iterator a_end,
4910 vector<function_decl*>::const_iterator b_begin,
4911 vector<function_decl*>::const_iterator b_end,
4916 #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.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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...
method_decl_sptr copy_member_function(class_or_union_sptr t, const method_decl_sptr &method)
Copy a method of a class_or_union into a new class_or_union.
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.
friend var_decl_sptr copy_member_variable(class_or_union_sptr t, const var_decl *variable)
Copy a data member of a class_or_union into a new class_or_union.
A predicate for deep equality of instances of type_base*.
bool find_enumerator_by_value(int64_t value, enum_type_decl::enumerator &result)
Find an enumerator by its value.
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.
Hash functor for instances of enum_type_decl.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
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.
bool get_is_for_static_method() const
Test if the current method type is for a static method or not.
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.
translation_unit * get_translation_unit(const type_or_decl_base &t)
Return the translation unit a declaration belongs to.
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.
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.
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.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
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 data_members & get_static_data_members() const
Get the static data memebers of this class_or_union.
virtual 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 ...
Hash functor for instances of pointer_type_def.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
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(...
Hash functor for instances of union_decl type.
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 operator!=(const enumerator &other) const
Inequality operator.
virtual bool operator==(const decl_base &) const
Equality operator between two scope_type_decl.
std::ostream & operator<<(std::ostream &o, elf_symbol::type t)
Serialize an instance of symbol_type and stream it to a given output stream.
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.
Hash functor for instances of type_decl.
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 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.
virtual 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.
friend type_base_sptr canonicalize(type_base_sptr, bool, bool)
Compute the canonical type of a given type.
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.
real_type::modifiers_type operator~(real_type::modifiers_type l)
Bitwise one's complement operator for real_type::modifiers_type.
The private data of type_or_decl_base.
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.
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 hash_t hash_value() const
Return the hash value of the current IR node.
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 members 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.
virtual const interned_string & get_name() const
Getter of the name of the current ptr-to-mbr-type.
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.
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.
virtual bool operator==(const decl_base &) const
Return true iff both scopes have the same names and have the same member decls.
Hash functor for instances of reference_type_def.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
hash_t peek_hash_value(const type_or_decl_base &artefact)
Get the hash value associated to an IR node.
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.
Hash functor for instances of qualified_type_def.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
friend method_decl_sptr copy_member_function(class_or_union_sptr t, const method_decl *m)
Copy a method of a class_or_union into a new class_or_union.
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.
friend hash_t peek_hash_value(const type_or_decl_base &)
Get the hash value associated to an IR node.
The base of an entity of the intermediate representation that is to be traversed. ...
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 hash_t hash_value() const
Return the hash value of the current IR node.
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.
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 hash_t hash_value() const
Return the hash value of the current IR node.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
virtual void on_canonical_type_set()
This function is automatically invoked whenever an instance of this type is canonicalized.
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.
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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...
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.
class_decl_sptr find_base_class(const string &qualified_name) const
Find a base class of a given qualified name for the current class.
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...
abg_compat::optional< uint64_t > hash_t
The abstraction for an 8 bytes hash value.
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...
Hash functor for instances of typedef_decl.
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 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.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current decl.
version & operator=(const version &o)
Assign a version to the current one.
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.
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.
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.
friend var_decl_sptr copy_member_variable(class_decl_sptr t, const var_decl_sptr &variable)
Copy a data member of a class_or_union into a new class_or_union.
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.
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.
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.
Hash functor for instances of array_type_def::hash.
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.
Hashing functor for the method_type type.
void set_underlying_type(const type_base_sptr &)
Setter ofthe underlying type of the typedef.
bool canonicalization_started() const
Getter of a flag saying if the canonicalization process has started or not.
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...
bound_value()
Default constructor of the array_type_def::subrange_type::bound_value class.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
The hashing functor for using instances of type_or_decl_base as values in a hash map or set...
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
void set_is_artificial(bool)
Setter of the flag that says if the artefact is artificial.
Hash functor for instances of array_type_def::subrange_type.
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.
bool find_enumerator_by_name(const string &name, enum_type_decl::enumerator &result)
Find an enumerator by its name.
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.
Hash functor for instances of ptr_to_mbr_type.
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 hash_t hash_value() const
Return the hash value of the current IR node.
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.
interned_string get_type_name() const
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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
shared_ptr< array_type_def > array_type_def_sptr
Convenience typedef for a shared pointer on a array_type_def.
bool equals_modulo_cv_qualifier(const array_type_def *l, const array_type_def *r)
Test if two array types 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.
virtual hash_t hash_value() const
Return the hash value of the current IR node.
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.
const vector< type_base_sptr > * get_canonical_types(const char *name) const
Get the vector of canonical types which have a given "string representation".
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.
friend hash_t set_or_get_cached_hash_value(const T &type_or_decl)
Set the hash value of an IR node and return it.
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.