13 #ifndef __ABG_IR_PRIV_H__
14 #define __ABG_IR_PRIV_H__
31 using std::unordered_set;
37 COMPARISON_RESULT_DIFFERENT = 0,
38 COMPARISON_RESULT_EQUAL = 1,
39 COMPARISON_RESULT_CYCLE_DETECTED = 2,
40 COMPARISON_RESULT_UNKNOWN = 3,
128 operator string()
const;
155 bool is_constructed_;
159 std::string comp_dir_path_;
160 std::string abs_path_;
163 mutable vector<type_base_sptr> synthesized_types_;
164 vector<function_type_sptr> live_fn_types_;
173 language_(LANG_UNKNOWN)
205 void* type_or_decl_ptr_;
207 bool is_recursive_artefact_;
233 is_recursive_artefact_(),
258 {
return hashing_state_;}
266 {
return is_recursive_artefact_;}
274 {is_recursive_artefact_ = f;}
281 {hashing_state_ = s;}
372 return hash_value(*tod);
418 const_cast<T&
>(tod).set_hash_value(h);
465 size_t alignment_in_bits;
466 size_t canonical_type_index;
484 canonical_type_index(),
485 naked_canonical_type()
490 type_base_sptr c = type_base_sptr())
492 alignment_in_bits(a),
493 canonical_type_index(),
495 naked_canonical_type(c.get())
543 mutable vector<type_base_sptr> sorted_canonical_types_;
544 type_base_sptr void_type_;
545 type_base_sptr void_pointer_type_;
546 type_base_sptr variadic_marker_type_;
551 class_set_type left_classes_being_compared_;
552 class_set_type right_classes_being_compared_;
557 fn_set_type left_fn_types_being_compared_;
558 fn_set_type right_fn_types_being_compared_;
562 type_comparison_result_type type_comparison_results_cache_;
563 vector<type_base_sptr> extra_live_types_;
601 vector<const type_base*> left_type_comp_operands_;
602 vector<const type_base*> right_type_comp_operands_;
604 #ifdef WITH_DEBUG_SELF_COMPARISON
619 unordered_map<string, uintptr_t> type_id_canonical_type_map_;
622 unordered_map<uintptr_t, string> pointer_type_id_map_;
624 bool canonicalization_started_;
625 bool canonicalization_is_done_;
626 bool decl_only_class_equals_definition_;
627 bool use_enum_binary_only_equality_;
628 bool allow_type_comparison_results_caching_;
631 #ifdef WITH_DEBUG_SELF_COMPARISON
632 bool self_comparison_debug_on_;
634 #ifdef WITH_DEBUG_TYPE_CANONICALIZATION
639 bool use_canonical_type_comparison_;
647 bool debug_type_canonicalization_;
648 bool debug_die_canonicalization_;
652 : canonicalization_started_(),
653 canonicalization_is_done_(),
654 decl_only_class_equals_definition_(
false),
655 use_enum_binary_only_equality_(
true),
656 allow_type_comparison_results_caching_(
false),
658 #ifdef WITH_DEBUG_SELF_COMPARISON
660 self_comparison_debug_on_(
false)
662 #ifdef WITH_DEBUG_TYPE_CANONICALIZATION
664 use_canonical_type_comparison_(
true),
665 debug_type_canonicalization_(
false),
666 debug_die_canonicalization_(
false)
677 {allow_type_comparison_results_caching_ = f;}
688 {
return allow_type_comparison_results_caching_;}
715 type_comparison_results_cache_.emplace
716 (std::make_pair(reinterpret_cast<uint64_t>(&first),
717 reinterpret_cast<uint64_t>(&second)),
748 type_comparison_result_type::const_iterator it =
749 type_comparison_results_cache_.find
750 (std::make_pair(reinterpret_cast<uint64_t>(&first),
751 reinterpret_cast<uint64_t>(&second)));
752 if (it == type_comparison_results_cache_.end())
762 {type_comparison_results_cache_.clear();}
779 left_type_comp_operands_.push_back(left);
780 right_type_comp_operands_.push_back(right);
800 const type_base *t = left_type_comp_operands_.back();
802 t = right_type_comp_operands_.back();
805 left_type_comp_operands_.pop_back();
806 right_type_comp_operands_.pop_back();
809 #ifdef WITH_DEBUG_SELF_COMPARISON
811 const unordered_map<string, uintptr_t>&
812 get_type_id_canonical_type_map()
const
813 {
return type_id_canonical_type_map_;}
815 unordered_map<string, uintptr_t>&
816 get_type_id_canonical_type_map()
817 {
return type_id_canonical_type_map_;}
819 const unordered_map<uintptr_t, string>&
820 get_pointer_type_id_map()
const
821 {
return pointer_type_id_map_;}
823 unordered_map<uintptr_t, string>&
824 get_pointer_type_id_map()
825 {
return pointer_type_id_map_;}
828 get_type_id_from_pointer(uintptr_t ptr)
const
830 auto it = get_pointer_type_id_map().find(ptr);
831 if (it != get_pointer_type_id_map().end())
837 get_type_id_from_type(
const type_base *t)
const
838 {
return get_type_id_from_pointer(reinterpret_cast<uintptr_t>(t));}
841 get_canonical_type_from_type_id(
const char* type_id)
const
845 auto it = get_type_id_canonical_type_map().find(type_id);
846 if (it != get_type_id_canonical_type_map().end())
864 check_canonical_type_from_abixml_during_self_comp(
const type_base* t,
867 if (!t || !t->get_corpus() || !c)
870 if (!(t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN))
876 unordered_map<uintptr_t, string>::const_iterator it =
877 pointer_type_id_map_.find(reinterpret_cast<uintptr_t>(t));
878 if (it == pointer_type_id_map_.end())
882 type_id = it->second;
887 type_base *original_canonical_type =
nullptr;
888 if (!type_id.empty())
890 unordered_map<string, uintptr_t>::const_iterator it =
891 type_id_canonical_type_map_.find(type_id);
892 if (it == type_id_canonical_type_map_.end())
894 original_canonical_type =
reinterpret_cast<type_base*
>(it->second);
903 if (original_canonical_type == c)
919 check_abixml_canonical_type_propagation_during_self_comp(
const type_base* t)
922 && t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN)
924 type_base* c = t->get_naked_canonical_type();
925 if (c && !check_canonical_type_from_abixml_during_self_comp(t, c))
927 string repr = t->get_pretty_representation(
true,
true);
928 string type_id = get_type_id_from_type(t);
929 std::cerr <<
"error: canonical type propagation error for '"
938 <<
", should have had canonical type: "
940 << get_canonical_type_from_type_id(type_id.c_str())
960 check_canonical_type_from_abixml_during_self_comp(
const type_base_sptr& t,
961 const type_base_sptr& c)
963 return check_canonical_type_from_abixml_during_self_comp(t.get(), c.get());
1045 else if (!!fl != !!sl)
1071 const decl_base_sptr &s)
1119 const type_base_sptr &s)
1133 if (f == s || !f || !s)
1146 == corpus::NATIVE_XML_ORIGIN))))
1152 if (f_is_ptr_ref_or_qual != s_is_ptr_ref_or_qual)
1153 return !f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual;
1155 if (f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual
1165 if (q->get_cv_quals() == qualified_type_def::CV_NONE)
1228 s1 =
is_typedef(f)->get_underlying_type()->get_cached_pretty_representation(
false);
1229 s2 =
is_typedef(s)->get_underlying_type()->get_cached_pretty_representation(
false);
1248 if (m_f->get_is_const() != m_s->get_is_const())
1249 return m_f->get_is_const();
1253 if (m_f->get_is_for_static_method() != m_s->get_is_for_static_method())
1254 return m_f->get_is_for_static_method() < m_s->get_is_for_static_method();
1276 if (h_f && h_s && *h_f != *h_s)
1282 return cti_f < cti_s;
1290 return decl_comp(fd, sd);
1312 if (k & type_or_decl_base::BASIC_TYPE)
1314 if (k & type_or_decl_base::SUBRANGE_TYPE)
1316 else if (k & type_or_decl_base::ENUM_TYPE)
1318 else if (k & type_or_decl_base::CLASS_TYPE)
1320 else if (k & type_or_decl_base::UNION_TYPE)
1322 else if (k & type_or_decl_base::FUNCTION_TYPE)
1324 else if (k & type_or_decl_base::METHOD_TYPE)
1326 else if (k & type_or_decl_base::TYPEDEF_TYPE)
1328 else if (k & type_or_decl_base::QUALIFIED_TYPE)
1330 else if (k & type_or_decl_base::POINTER_TYPE)
1332 else if (k & type_or_decl_base::REFERENCE_TYPE)
1334 else if (k & type_or_decl_base::POINTER_TO_MEMBER_TYPE)
1336 else if (k & type_or_decl_base::ARRAY_TYPE)
1363 bool result =
false;
1364 if (rank_f < rank_s)
1366 else if (rank_f == rank_s)
1369 result = comp(&f,&s);
1416 template <
typename IteratorType>
1422 return std::stable_sort(begin, end, comp);
1459 template<
typename input_iterator,
1460 typename deref_lambda>
1463 const input_iterator& end,
1465 bool do_log =
false,
1466 bool show_stats =
false)
1471 auto first_iter = begin;
1472 auto first = deref(first_iter);
1483 std::cerr <<
"Canonicalizing types ...\n";
1487 for (t = begin,i = 0; t != end; ++t, ++i)
1489 if (do_log && show_stats)
1490 std::cerr <<
"#" << std::dec << i <<
" ";
1500 std::cerr <<
"Canonicalizing of types DONE in: " << tmr <<
"\n\n";
1521 template <
typename IteratorType,
1522 typename deref_lambda>
1527 bool do_log =
false,
1528 bool show_stats =
false)
1533 std::cerr <<
"sorting types before canonicalization ... \n";
1542 std::cerr <<
"sorted types for c14n in: " << tmr <<
"\n\n";
1544 std::cerr <<
"hashing types before c14n ...\n";
1548 for (IteratorType t = begin; t != end; ++t)
1555 std::cerr <<
"hashed types in: " << tmr <<
"\n\n";
1578 template <
typename IteratorType,
1579 typename deref_lambda>
1602 member_function_templates member_function_templates_;
1603 member_class_templates member_class_templates_;
1604 bool is_printing_flat_representation_ =
false;
1607 unordered_set<type_base*> comparing_class_layouts_;
1613 : data_members_(data_mbrs),
1614 member_functions_(mbr_fns)
1616 for (
const auto& data_member: data_members_)
1618 static_data_members_.push_back(data_member);
1620 non_static_data_members_.push_back(data_member);
1643 env.priv_->left_classes_being_compared_.insert(&first);
1644 env.priv_->right_classes_being_compared_.insert(&second);
1682 const class_or_union_sptr& second)
const
1705 env.priv_->left_classes_being_compared_.erase(&first);
1706 env.priv_->right_classes_being_compared_.erase(&second);
1727 if (!first || !second)
1746 return (env.priv_->left_classes_being_compared_.count(&first)
1747 || env.priv_->right_classes_being_compared_.count(&second)
1748 || env.priv_->right_classes_being_compared_.count(&first)
1749 || env.priv_->left_classes_being_compared_.count(&second));
1764 if (first && second)
1777 {is_printing_flat_representation_ =
true;}
1787 {is_printing_flat_representation_ =
false;}
1797 {
return is_printing_flat_representation_;}
1810 bool is_pretty_printing_ =
false;
1815 type_base_sptr return_type)
1817 return_type_(return_type)
1820 priv(type_base_sptr return_type)
1821 : return_type_(return_type)
1837 env.priv_->left_fn_types_being_compared_.insert(&first);
1838 env.priv_->right_fn_types_being_compared_.insert(&second);
1854 env.priv_->left_fn_types_being_compared_.erase(&first);
1855 env.priv_->right_fn_types_being_compared_.erase(&second);
1869 return (env.priv_->left_fn_types_being_compared_.count(&first)
1871 env.priv_->right_fn_types_being_compared_.count(&second));
1882 {is_pretty_printing_ =
true;}
1892 {is_pretty_printing_ =
false;}
1902 {
return is_pretty_printing_;}
1916 #endif // __ABG_IR_PRIV_H__
bool operator()(const decl_base *f, const decl_base *s)
The "Less Than" comparison operator of this functor.
The type of the private data of the function_type type.
void set_hashing_state(hashing::hashing_state s) const
Setter of the hashing state of the current IR node.
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
The base type of all declarations.
friend bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
type_base * peel_pointer_or_reference_type(const type_base *type, bool peel_qual_type)
Return the leaf underlying or pointed-to type node of a, pointer_type_def, reference_type_def or qual...
modifiers_type
The modifiers of the base types above. Several modifiers can be combined for a given base type...
void mark_as_being_compared(const class_or_union_sptr &first, const class_or_union_sptr &second) const
Mark a pair of classes or unions as being currently compared using the class_or_union== operator...
bool canonicalization_is_done() const
Test if the canonicalization of types created out of the current environment is done.
bool has_artificial_or_natural_location(const type_base *t)
Test if a type has an artificial or natural location.
comparison_result
The result of structural comparison of type ABI artifacts.
hash_t do_hash_value(const T &tod)
Compute the hash value of an IR node and return it.
bool operator==(const real_type &) const
Equality operator for the real_type.
bool parse_real_type(const string &type_name, real_type &type)
Parse a real type from a string.
bool is_recursive_artefact() const
Getter of the property which flags the current artefact as being recursive or not.
base_type
The possible base types of integral types. We might have forgotten many of these, so do not hesitate ...
hash_t set_or_get_cached_hash_value(const T &tod)
Set the hash value of an IR node and return it.
An abstraction helper for type declarations.
unordered_map< uint64_t_pair_type, bool, uint64_t_pair_hash > type_comparison_result_type
A convenience typedef for a map which key is a pair of uint64_t and which value is a boolean...
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
const location & get_artificial_or_natural_location(const decl_base *decl)
Get the artificial location of a decl.
Definition of the private data of type_base.
bool has_artificial_or_natural_location(const decl_base *d)
Test if a decl has an artificial or natural location.
weak_ptr< typedef_decl > typedef_decl_wptr
Convenience typedef for a weak pointer on a typedef_decl.
size_t rank(enum type_or_decl_base::type_or_decl_kind k)
Return the rank of a given kind of IR node.
bool operator()(const decl_base_sptr &f, const decl_base_sptr &s)
The "Less Than" comparison operator of this functor.
void set_printing_flat_representation()
Set the 'is_printing_flat_representation_' boolean to true.
The abstraction of a qualified type.
unordered_set< const function_type * > fn_set_type
A convenience typedef for a set of pointer to function_type.
The "char32_t" base type.
bool operator()(const type_base_sptr &f, const type_base_sptr &s)
"Less Than" operator for type IR nodes.
void is_recursive_artefact(bool f)
Setter of the property which flags the current artefact as being recursive or not.
This is the abstraction of the set of relevant artefacts (types, variable declarations, functions, templates, etc) bundled together into a translation unit.
bool comparison_started(const class_or_union *first, const class_or_union *second) const
Test if a pair of class_or_union is being currently compared.
shared_ptr< scope_decl > global_scope_sptr
Convenience typedef for a shared pointer on a global_scope.
Abstracts the type of a class member function.
A cycle has been detected in the graph on the current node node.
unordered_set< const class_or_union * > class_set_type
A convenience typedef for a set of pointer to class_or_union.
void push_composite_type_comparison_operands(const type_base *left, const type_base *right)
Push a pair of operands on the stack of operands of the current type comparison, during type canonica...
virtual const interned_string & get_name() const
Getter for the name of the current decl.
void mark_as_being_compared(const class_or_union &first, const class_or_union &second) const
Mark a pair of classes or unions as being currently compared using the class_or_union== operator...
void sort_types_for_hash_computing_and_c14n(IteratorType begin, IteratorType end)
Sort types before hashing (and then canonicalizing) them.
void unmark_as_being_compared(const function_type &first, const function_type &second) const
Mark a given pair of function_type as being compared.
hash_t combine_hashes(hash_t val1, hash_t val2)
Combine two hash values to produce a third hash value.
const std::string & get_absolute_path() const
Get the concatenation of the build directory and the relative path of the translation unit...
void canonicalize_types(const input_iterator &begin, const input_iterator &end, deref_lambda deref, bool do_log=false, bool show_stats=false)
Compute the canonical type for all the IR types of the system.
unordered_map< string, method_decl_sptr > string_mem_fn_sptr_map_type
Convenience typedef.
The private data of the environment type.
void hash_and_canonicalize_types(IteratorType begin, IteratorType end, deref_lambda deref, bool do_log=false, bool show_stats=false)
Hash and canonicalize a sequence of types.
void force_set_hash_value(hash_t h)
Setter of the hashing value of the current IR node.
void unset_printing_flat_representation()
Set the 'is_printing_flat_representation_' boolean to false.
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.
enum type_or_decl_kind kind() const
Getter of the kind of the IR node.
corpus::origin operator&=(corpus::origin &l, corpus::origin r)
Bitwise &= operator for the corpus::origin type.
bool is_non_canonicalized_type(const type_base *t)
Test if a given type is allowed to be non canonicalized.
Simplified implementation of std::optional just enough to be used as a replacement for our purposes a...
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
const environment & get_environment() const
Getter of the environment of the current ABI artifact.
A functor to sort decls somewhat topologically. That is, types are sorted in a way that makes the one...
bool is_unique_type(const type_base_sptr &t)
Test if a type is unique in the entire environment.
Private type to hold private members of translation_unit.
void kind(enum type_or_decl_kind k)
Setter of the kind of the IR node.
typedef_decl_sptr is_typedef(const type_or_decl_base_sptr t)
Test whether a type is a typedef.
Toplevel namespace for libabigail.
A functor to sort types somewhat topologically. That is, types are sorted in a way that makes the one...
bool has_artificial_or_natural_location(const decl_base *d)
Test if a decl has an artificial or natural location.
No hashing has been done/started.
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
size_t get_canonical_type_index(const type_base &t)
Getter of the canonical type index of a given type.
bool operator()(const type_base &f, const type_base &s)
"Less Than" operator for type IR nodes.
hash_t peek_hash_value(const type_or_decl_base &artefact)
Get the hash value associated to an IR node.
modifiers_type get_modifiers() const
Getter of the modifiers bitmap of the real_type.
bool operator()(const type_base_sptr &f, const type_base_sptr &s)
The "Less Than" comparison operator of this functor.
void mark_as_being_compared(const function_type &first, const function_type &second) const
Mark a given pair of function_type as being compared.
bool is_ptr_ref_or_qual_type(const type_base *t)
Helper to detect if a type is either a reference, a pointer, or a qualified type. ...
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current type.
The base type of class_decl and union_decl.
The source location of a token.
void mark_as_being_compared(const class_or_union *first, const class_or_union *second) const
Mark a pair of classes or unions as being currently compared using the class_or_union== operator...
This is a type that aggregates maps of all the kinds of types that are supported by libabigail...
The "bool" base type in C++ or "_Bool" in C11.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
vector< method_decl_sptr > member_functions
Convenience typedef.
weak_ptr< corpus > corpus_wptr
Convenience typedef for a weak pointer to a corpus.
void set_is_pretty_printing()
Set the 'is_pretty_printing_' boolean to true.
type_base_sptr canonicalize(type_base_sptr t, bool do_log, bool show_stats)
Compute the canonical type of a given type.
#define ABG_ASSERT(cond)
This is a wrapper around the 'assert' glibc call. It allows for its argument to have side effects...
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 ...
void cache_type_comparison_result(T &first, T &second, bool r)
Cache the result of comparing two sub-types.
bool is_pretty_printing() const
Getter of the 'is_pretty_printing_' boolean.
bool type_originates_from_corpus(type_base_sptr t, corpus_sptr &c)
Test if a type originates from a corpus.
void sort_and_canonicalize_types(IteratorType begin, IteratorType end, deref_lambda deref)
Sort and canonicalize a sequence of types.
abg_compat::optional< uint64_t > hash_t
The abstraction for an 8 bytes hash value.
bool is_type_comparison_cached(T &first, T &second, bool &r)
Retrieve the result of comparing two sub-types from the cache, if it was previously stored...
type_or_decl_kind
This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact...
void set_modifiers(modifiers_type)
Setter of the modifiers bitmap of the real_type.
corpus::origin operator|(corpus::origin l, corpus::origin r)
Bitwise | operator for the corpus::origin type.
bool operator()(const type_base *f, const type_base *s)
"Less Than" operator for type IR nodes.
bool compare_using_locations(const decl_base *f, const decl_base *s)
Compare decls using their locations.
priv(const environment &e, enum type_or_decl_kind k=ABSTRACT_TYPE_OR_DECL)
Constructor of the type_or_decl_base::priv private type.
void unset_is_pretty_printing()
Set the 'is_pretty_printing_' boolean to false.
The aray size type used by Clang.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current decl.
bool comparison_started(const function_type &first, const function_type &second) const
Tests if a function_type is currently being compared.
qualified_type_def * is_qualified_type(const type_or_decl_base *t)
Test whether a type is a reference_type_def.
The "long long" modifier.
Hashing a sub-type while hashing another type.
const translation_unit * get_translation_unit() const
Get the translation_unit this ABI artifact belongs to.
language
The language of the translation unit.
uint64_t operator()(const std::pair< uint64_t, uint64_t > &p) const
Hashing function for a pair of uint64_t.
corpus::origin operator|=(corpus::origin &l, corpus::origin r)
Bitwise |= operator for the corpus::origin type.
void unmark_as_being_compared(const class_or_union *first, const class_or_union *second) const
If a pair of class_or_union has been previously marked as being compared – via an invocation of mark...
bool allow_type_comparison_results_caching() const
Check whether if caching of the sub-types comparison results during the invocation of the equal overl...
unordered_map< string, method_decl * > string_mem_fn_ptr_map_type
Convenience typedef.
std::pair< uint64_t, uint64_t > uint64_t_pair_type
A convenience typedef for a pair of uint64_t which is initially intended to store a pair of pointer v...
unordered_set< uint64_t_pair_type, uint64_t_pair_hash > uint64_t_pairs_set_type
A convenience typedef for a set of uint64_t_pair.
The abstraction of an interned string.
bool get_is_anonymous() const
Test if the current declaration is anonymous.
bool operator()(const type_base *f, const type_base *s)
The "Less Than" comparison operator of this functor.
bool canonicalization_started() const
Getter of a flag saying if the canonicalization process has started or not.
hashing::hashing_state get_hashing_state() const
Getter the hashing state of the current IR node.
void clear_type_comparison_results_cache()
Clear the cache type comparison results.
Hashing of given IR node started and is now done. If an ABI artifact is in this state, then it must have an hash value available and should be get by peek_hash_value or type_or_decl_base::hash_value().
base_type get_base_type() const
Getter of the base type of the real_type.
The interned string pool.
type_base_sptr peel_typedef_pointer_or_reference_type(const type_base_sptr type)
Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def, reference_type_def, or array_type_def node.
void allow_type_comparison_results_caching(bool f)
Allow caching of the sub-types comparison results during the invocation of the equal overloads for cl...
This type abstracts the configuration information of the library.
origin get_origin() const
Getter for the origin of the corpus.
string to_string(bool internal=false) const
Return the string representation of the current instance of real_type.
vector< var_decl_sptr > data_members
Convenience typedef.
Functor used to sort types before hashing them.
bool is_printing_flat_representation() const
Getter of the 'is_printing_flat_representation_' boolean.
const corpus * get_corpus() const
Get the corpus this ABI artifact belongs to.
corpus::origin operator&(corpus::origin l, corpus::origin r)
Bitwise & operator for the corpus::origin type.
The hashing functor for a pair of uint64_t.
void unmark_as_being_compared(const class_or_union &first, const class_or_union &second) const
If a pair of class_or_union has been previously marked as being compared – via an invocation of mark...
bool comparison_started(const class_or_union &first, const class_or_union &second) const
Test if a pair of class_or_union is being currently compared.
void pop_composite_type_comparison_operands(const type_base *left, const type_base *right)
Pop a pair of operands from the stack of operands to the current type comparison. ...
The internal representation of an integral type.
bool type_is_suitable_for_hash_computing(const type_base &)
Test if we should attempt to compute a hash value for a given type.
void set_hash_value(hash_t h)
Setter of the hashing value of the current IR node.
unsigned get_value() const
Get the value of the location.
method_type_sptr is_method_type(const type_or_decl_base_sptr &t)
Test whether a type is a method_type.
hashing_state
Enumeration of the different hashing states of an IR node being hashed.
bool has_artificial_or_natural_location(const type_base *t)
Test if a type has an artificial or natural location.
Abstraction of a function type.
enum type_or_decl_kind kind() const
Getter for the "kind" property of type_or_decl_base type.
hash_t hash(uint64_t v, uint64_t seed)
Hash an integer value and combine it with a hash previously computed.
The entry point to manage locations.
real_type()
Default constructor of the real_type.