13#ifndef __ABG_IR_PRIV_H__
14#define __ABG_IR_PRIV_H__
36 COMPARISON_RESULT_DIFFERENT = 0,
37 COMPARISON_RESULT_EQUAL = 1,
38 COMPARISON_RESULT_CYCLE_DETECTED = 2,
39 COMPARISON_RESULT_UNKNOWN = 3,
104 modifiers_type modifiers_;
127 operator string()
const;
154 bool is_constructed_;
158 std::string comp_dir_path_;
159 std::string abs_path_;
162 mutable vector<type_base_sptr> synthesized_types_;
163 vector<function_type_sptr> live_fn_types_;
172 language_(LANG_UNKNOWN)
204 void* type_or_decl_ptr_;
206 bool is_recursive_artefact_;
231 hashing_state_(hashing::HASHING_NOT_DONE_STATE),
232 is_recursive_artefact_(),
257 {
return hashing_state_;}
265 {
return is_recursive_artefact_;}
273 {is_recursive_artefact_ = f;}
280 {hashing_state_ = s;}
348 typename T::hash do_hash;
371 return hash_value(*tod);
417 const_cast<T&
>(tod).set_hash_value(h);
464 size_t alignment_in_bits;
465 size_t canonical_type_index;
483 canonical_type_index(),
484 naked_canonical_type()
489 type_base_sptr c = type_base_sptr())
491 alignment_in_bits(a),
492 canonical_type_index(),
494 naked_canonical_type(c.get())
542 mutable vector<type_base_sptr> sorted_canonical_types_;
543 type_base_sptr void_type_;
544 type_base_sptr void_pointer_type_;
545 type_base_sptr variadic_marker_type_;
562 vector<type_base_sptr> extra_live_types_;
600 vector<const type_base*> left_type_comp_operands_;
601 vector<const type_base*> right_type_comp_operands_;
603#ifdef WITH_DEBUG_SELF_COMPARISON
618 unordered_map<string, uintptr_t> type_id_canonical_type_map_;
621 unordered_map<uintptr_t, string> pointer_type_id_map_;
623 bool canonicalization_started_;
624 bool canonicalization_is_done_;
625 bool decl_only_class_equals_definition_;
626 bool use_enum_binary_only_equality_;
627 bool allow_type_comparison_results_caching_;
630#ifdef WITH_DEBUG_SELF_COMPARISON
631 bool self_comparison_debug_on_;
633#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
638 bool use_canonical_type_comparison_;
646 bool debug_type_canonicalization_;
647 bool debug_die_canonicalization_;
651 : canonicalization_started_(),
652 canonicalization_is_done_(),
653 decl_only_class_equals_definition_(
false),
654 use_enum_binary_only_equality_(
true),
655 allow_type_comparison_results_caching_(
false),
657#ifdef WITH_DEBUG_SELF_COMPARISON
659 self_comparison_debug_on_(
false)
661#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
663 use_canonical_type_comparison_(
true),
664 debug_type_canonicalization_(
false),
665 debug_die_canonicalization_(
false)
676 {allow_type_comparison_results_caching_ = f;}
687 {
return allow_type_comparison_results_caching_;}
714 type_comparison_results_cache_.emplace
715 (std::make_pair(
reinterpret_cast<uint64_t
>(&first),
716 reinterpret_cast<uint64_t
>(&second)),
747 type_comparison_result_type::const_iterator it =
748 type_comparison_results_cache_.find
749 (std::make_pair(
reinterpret_cast<uint64_t
>(&first),
750 reinterpret_cast<uint64_t
>(&second)));
751 if (it == type_comparison_results_cache_.end())
761 {type_comparison_results_cache_.clear();}
778 left_type_comp_operands_.push_back(left);
779 right_type_comp_operands_.push_back(right);
799 const type_base *t = left_type_comp_operands_.back();
801 t = right_type_comp_operands_.back();
804 left_type_comp_operands_.pop_back();
805 right_type_comp_operands_.pop_back();
808#ifdef WITH_DEBUG_SELF_COMPARISON
810 const unordered_map<string, uintptr_t>&
811 get_type_id_canonical_type_map()
const
812 {
return type_id_canonical_type_map_;}
814 unordered_map<string, uintptr_t>&
815 get_type_id_canonical_type_map()
816 {
return type_id_canonical_type_map_;}
818 const unordered_map<uintptr_t, string>&
819 get_pointer_type_id_map()
const
820 {
return pointer_type_id_map_;}
822 unordered_map<uintptr_t, string>&
823 get_pointer_type_id_map()
824 {
return pointer_type_id_map_;}
827 get_type_id_from_pointer(uintptr_t ptr)
const
829 auto it = get_pointer_type_id_map().find(ptr);
830 if (it != get_pointer_type_id_map().end())
836 get_type_id_from_type(
const type_base *t)
const
837 {
return get_type_id_from_pointer(
reinterpret_cast<uintptr_t
>(t));}
840 get_canonical_type_from_type_id(
const char* type_id)
const
844 auto it = get_type_id_canonical_type_map().find(type_id);
845 if (it != get_type_id_canonical_type_map().end())
863 check_canonical_type_from_abixml_during_self_comp(
const type_base* t,
866 if (!t || !t->get_corpus() || !c)
869 if (!(t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN))
875 unordered_map<uintptr_t, string>::const_iterator it =
876 pointer_type_id_map_.find(
reinterpret_cast<uintptr_t
>(t));
877 if (it == pointer_type_id_map_.end())
881 type_id = it->second;
886 type_base *original_canonical_type =
nullptr;
887 if (!type_id.empty())
889 unordered_map<string, uintptr_t>::const_iterator it =
890 type_id_canonical_type_map_.find(type_id);
891 if (it == type_id_canonical_type_map_.end())
893 original_canonical_type =
reinterpret_cast<type_base*
>(it->second);
902 if (original_canonical_type == c)
918 check_abixml_canonical_type_propagation_during_self_comp(
const type_base* t)
921 && t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN)
923 type_base* c = t->get_naked_canonical_type();
924 if (c && !check_canonical_type_from_abixml_during_self_comp(t, c))
926 string repr = t->get_pretty_representation(
true,
true);
927 string type_id = get_type_id_from_type(t);
928 std::cerr <<
"error: canonical type propagation error for '"
937 <<
", should have had canonical type: "
939 << get_canonical_type_from_type_id(type_id.c_str())
959 check_canonical_type_from_abixml_during_self_comp(
const type_base_sptr& t,
960 const type_base_sptr& c)
962 return check_canonical_type_from_abixml_during_self_comp(t.get(), c.get());
1044 else if (!!fl != !!sl)
1070 const decl_base_sptr &s)
1118 const type_base_sptr &s)
1132 if (f == s || !f || !s)
1145 == corpus::NATIVE_XML_ORIGIN))))
1151 if (f_is_ptr_ref_or_qual != s_is_ptr_ref_or_qual)
1152 return !f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual;
1154 if (f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual
1164 if (q->get_cv_quals() == qualified_type_def::CV_NONE)
1227 s1 =
is_typedef(f)->get_underlying_type()->get_cached_pretty_representation(
false);
1228 s2 =
is_typedef(s)->get_underlying_type()->get_cached_pretty_representation(
false);
1247 if (m_f->get_is_const() != m_s->get_is_const())
1248 return m_f->get_is_const();
1252 if (m_f->get_is_for_static_method() != m_s->get_is_for_static_method())
1253 return m_f->get_is_for_static_method() < m_s->get_is_for_static_method();
1275 if (h_f && h_s && *h_f != *h_s)
1281 return cti_f < cti_s;
1289 return decl_comp(fd, sd);
1311 if (k & type_or_decl_base::BASIC_TYPE)
1313 if (k & type_or_decl_base::SUBRANGE_TYPE)
1315 else if (k & type_or_decl_base::ENUM_TYPE)
1317 else if (k & type_or_decl_base::CLASS_TYPE)
1319 else if (k & type_or_decl_base::UNION_TYPE)
1321 else if (k & type_or_decl_base::FUNCTION_TYPE)
1323 else if (k & type_or_decl_base::METHOD_TYPE)
1325 else if (k & type_or_decl_base::TYPEDEF_TYPE)
1327 else if (k & type_or_decl_base::QUALIFIED_TYPE)
1329 else if (k & type_or_decl_base::POINTER_TYPE)
1331 else if (k & type_or_decl_base::REFERENCE_TYPE)
1333 else if (k & type_or_decl_base::POINTER_TO_MEMBER_TYPE)
1335 else if (k & type_or_decl_base::ARRAY_TYPE)
1362 bool result =
false;
1363 if (rank_f < rank_s)
1365 else if (rank_f == rank_s)
1368 result = comp(&f,&s);
1415template <
typename IteratorType>
1421 return std::stable_sort(begin, end, comp);
1458template<
typename input_iterator,
1459 typename deref_lambda>
1462 const input_iterator& end,
1464 bool do_log =
false,
1465 bool show_stats =
false)
1470 auto first_iter = begin;
1471 auto first = deref(first_iter);
1482 std::cerr <<
"Canonicalizing types ...\n";
1486 for (t = begin,i = 0; t != end; ++t, ++i)
1488 if (do_log && show_stats)
1489 std::cerr <<
"#" << std::dec << i <<
" ";
1499 std::cerr <<
"Canonicalizing of types DONE in: " << tmr <<
"\n\n";
1520template <
typename IteratorType,
1521 typename deref_lambda>
1526 bool do_log =
false,
1527 bool show_stats =
false)
1532 std::cerr <<
"sorting types before canonicalization ... \n";
1541 std::cerr <<
"sorted types for c14n in: " << tmr <<
"\n\n";
1543 std::cerr <<
"hashing types before c14n ...\n";
1547 for (IteratorType t = begin; t != end; ++t)
1554 std::cerr <<
"hashed types in: " << tmr <<
"\n\n";
1577template <
typename IteratorType,
1578 typename deref_lambda>
1601 member_function_templates member_function_templates_;
1602 member_class_templates member_class_templates_;
1603 bool is_printing_flat_representation_ =
false;
1610 : data_members_(data_mbrs),
1611 member_functions_(mbr_fns)
1613 for (
const auto& data_member: data_members_)
1615 static_data_members_.push_back(data_member);
1617 non_static_data_members_.push_back(data_member);
1640 env.priv_->left_classes_being_compared_.insert(&first);
1641 env.priv_->right_classes_being_compared_.insert(&second);
1679 const class_or_union_sptr& second)
const
1702 env.priv_->left_classes_being_compared_.erase(&first);
1703 env.priv_->right_classes_being_compared_.erase(&second);
1724 if (!first || !second)
1743 return (env.priv_->left_classes_being_compared_.count(&first)
1744 || env.priv_->right_classes_being_compared_.count(&second)
1745 || env.priv_->right_classes_being_compared_.count(&first)
1746 || env.priv_->left_classes_being_compared_.count(&second));
1761 if (first && second)
1774 {is_printing_flat_representation_ =
true;}
1784 {is_printing_flat_representation_ =
false;}
1794 {
return is_printing_flat_representation_;}
1807 bool is_pretty_printing_ =
false;
1812 type_base_sptr return_type)
1814 return_type_(return_type)
1817 priv(type_base_sptr return_type)
1818 : return_type_(return_type)
1834 env.priv_->left_fn_types_being_compared_.insert(&first);
1835 env.priv_->right_fn_types_being_compared_.insert(&second);
1851 env.priv_->left_fn_types_being_compared_.erase(&first);
1852 env.priv_->right_fn_types_being_compared_.erase(&second);
1866 return (env.priv_->left_fn_types_being_compared_.count(&first)
1868 env.priv_->right_fn_types_being_compared_.count(&second));
1879 {is_pretty_printing_ =
true;}
1889 {is_pretty_printing_ =
false;}
1899 {
return is_pretty_printing_;}
#define ABG_ASSERT(cond)
This is a wrapper around the 'assert' glibc call. It allows for its argument to have side effects,...
Simplified implementation of std::optional just enough to be used as a replacement for our purposes a...
This type abstracts the configuration information of the library.
The interned string pool.
The abstraction of an interned string.
The base type of class_decl and union_decl.
unordered_map< string, method_decl_sptr > string_mem_fn_sptr_map_type
Convenience typedef.
vector< method_decl_sptr > member_functions
Convenience typedef.
vector< var_decl_sptr > data_members
Convenience typedef.
unordered_map< string, method_decl * > string_mem_fn_ptr_map_type
Convenience typedef.
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
origin get_origin() const
Getter for the origin of the corpus.
The base type of all declarations.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current decl.
friend bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
virtual const interned_string & get_name() const
Getter for the name of the current decl.
bool get_is_anonymous() const
Test if the current declaration is anonymous.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
bool canonicalization_is_done() const
Test if the canonicalization of types created out of the current environment is done.
bool canonicalization_started() const
Getter of a flag saying if the canonicalization process has started or not.
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 ...
Abstraction of a function type.
std::vector< parameter_sptr > parameters
Convenience typedef for a vector of parameter_sptr.
The entry point to manage locations.
The source location of a token.
unsigned get_value() const
Get the value of the location.
Abstracts the type of a class member function.
The abstraction of a qualified type.
The internal representation of an integral type.
void set_modifiers(modifiers_type)
Setter of the modifiers bitmap of the real_type.
string to_string(bool internal=false) const
Return the string representation of the current instance of real_type.
base_type get_base_type() const
Getter of the base type of the real_type.
bool operator==(const real_type &) const
Equality operator for the real_type.
real_type()
Default constructor of the real_type.
modifiers_type
The modifiers of the base types above. Several modifiers can be combined for a given base type....
@ LONG_LONG_MODIFIER
The "long long" modifier.
@ LONG_MODIFIER
The "long" modifier.
@ SIGNED_MODIFIER
The "signed" modifier.
@ UNSIGNED_MODIFIER
The "unsigned" modier.
@ SHORT_MODIFIER
The "short" modifier.
base_type
The possible base types of integral types. We might have forgotten many of these, so do not hesitate ...
@ WCHAR_T_BASE_TYPE
The "wchar_t" base type.
@ CHAR32_T_BASE_TYPE
The "char32_t" base type.
@ FLOAT_BASE_TYPE
The "float" base type.
@ BOOL_BASE_TYPE
The "bool" base type in C++ or "_Bool" in C11.
@ CHAR_BASE_TYPE
The "char" base type.
@ CHAR16_T_BASE_TYPE
The "char16_t base type.
@ INT_BASE_TYPE
The "int" base type.
@ ARRAY_SIZE_BASE_TYPE
The aray size type used by Clang.
@ DOUBLE_BASE_TYPE
The "double" base type.
modifiers_type get_modifiers() const
Getter of the modifiers bitmap of the real_type.
This is the abstraction of the set of relevant artefacts (types, variable declarations,...
const std::string & get_absolute_path() const
Get the concatenation of the build directory and the relative path of the translation unit.
shared_ptr< scope_decl > global_scope_sptr
Convenience typedef for a shared pointer on a global_scope.
language
The language of the translation unit.
An abstraction helper for type declarations.
const interned_string & get_cached_pretty_representation(bool internal=false) const
Get the pretty representation of the current type.
This is a type that aggregates maps of all the kinds of types that are supported by libabigail.
const corpus * get_corpus() const
Get the corpus this ABI artifact belongs to.
enum type_or_decl_kind kind() const
Getter for the "kind" property of type_or_decl_base type.
type_or_decl_kind
This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact....
const environment & get_environment() const
Getter of the environment of the current ABI artifact.
const translation_unit * get_translation_unit() const
Get the translation_unit this ABI artifact belongs to.
hash_t combine_hashes(hash_t val1, hash_t val2)
Combine two hash values to produce a third hash value.
hashing_state
Enumeration of the different hashing states of an IR node being hashed.
@ HASHING_FINISHED_STATE
Hashing of given IR node started and is now done. If an ABI artifact is in this state,...
@ HASHING_CYCLED_TYPE_STATE
A cycle has been detected in the graph on the current node node.
@ HASHING_SUBTYPE_STATE
Hashing a sub-type while hashing another type.
@ HASHING_NOT_DONE_STATE
No hashing has been done/started.
real_type::modifiers_type operator~(real_type::modifiers_type l)
Bitwise one's complement operator for real_type::modifiers_type.
bool is_non_canonicalized_type(const type_base *t)
Test if a given type is allowed to be non canonicalized.
weak_ptr< typedef_decl > typedef_decl_wptr
Convenience typedef for a weak pointer on a typedef_decl.
hash_t peek_hash_value(const type_or_decl_base &artefact)
Get the hash value associated to an IR node.
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....
size_t get_canonical_type_index(const type_base &t)
Getter of the canonical type index of a given 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.
corpus::origin operator|=(corpus::origin &l, corpus::origin r)
Bitwise |= operator for the corpus::origin type.
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
unordered_set< const class_or_union * > class_set_type
A convenience typedef for a set of pointer to class_or_union.
bool type_originates_from_corpus(type_base_sptr t, corpus_sptr &c)
Test if a type originates from a corpus.
bool parse_real_type(const string &type_name, real_type &type)
Parse a real type from a string.
unordered_set< const function_type * > fn_set_type
A convenience typedef for a set of pointer to function_type.
comparison_result
The result of structural comparison of type ABI artifacts.
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,...
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.
void sort_and_canonicalize_types(IteratorType begin, IteratorType end, deref_lambda deref)
Sort and canonicalize a sequence of types.
hash_t set_or_get_cached_hash_value(const T &tod)
Set the hash value of an IR node and return it.
typedef_decl_sptr is_typedef(const type_or_decl_base_sptr t)
Test whether a type is a typedef.
abg_compat::optional< uint64_t > hash_t
The abstraction for an 8 bytes hash value.
weak_ptr< corpus > corpus_wptr
Convenience typedef for a weak pointer to a corpus.
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...
corpus::origin operator|(corpus::origin l, corpus::origin r)
Bitwise | operator for the corpus::origin type.
corpus::origin operator&(corpus::origin l, corpus::origin r)
Bitwise & operator for the corpus::origin 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.
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
void sort_types_for_hash_computing_and_c14n(IteratorType begin, IteratorType end)
Sort types before hashing (and then canonicalizing) them.
const location & get_artificial_or_natural_location(const decl_base *decl)
Get the artificial location of a decl.
type_base_sptr canonicalize(type_base_sptr t, bool do_log, bool show_stats)
Compute the canonical type of a given type.
bool compare_using_locations(const decl_base *f, const decl_base *s)
Compare decls using their locations.
bool is_unique_type(const type_base_sptr &t)
Test if a type is unique in the entire environment.
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.
corpus::origin operator&=(corpus::origin &l, corpus::origin r)
Bitwise &= operator for the corpus::origin type.
method_type_sptr is_method_type(const type_or_decl_base_sptr &t)
Test whether a type is a method_type.
qualified_type_def * is_qualified_type(const type_or_decl_base *t)
Test whether a type is a reference_type_def.
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.
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...
hash_t do_hash_value(const T &tod)
Compute the hash value of an IR node and return it.
Toplevel namespace for libabigail.
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.
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 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.
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 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 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 is_printing_flat_representation() const
Getter of the 'is_printing_flat_representation_' boolean.
void unset_printing_flat_representation()
Set the 'is_printing_flat_representation_' boolean to false.
void set_printing_flat_representation()
Set the 'is_printing_flat_representation_' boolean to true.
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_...
A functor to sort decls somewhat topologically. That is, types are sorted in a way that makes the one...
bool operator()(const decl_base *f, const decl_base *s)
The "Less Than" comparison operator of this functor.
bool operator()(const decl_base_sptr &f, const decl_base_sptr &s)
The "Less Than" comparison operator of this functor.
bool has_artificial_or_natural_location(const type_base *t)
Test if a type has an artificial or natural location.
bool has_artificial_or_natural_location(const decl_base *d)
Test if a decl has an artificial or natural location.
The private data of the environment type.
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.
void clear_type_comparison_results_cache()
Clear the cache type comparison results.
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...
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.
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...
bool allow_type_comparison_results_caching() const
Check whether if caching of the sub-types comparison results during the invocation of the equal overl...
void cache_type_comparison_result(T &first, T &second, bool r)
Cache the result of comparing two sub-types.
The type of the private data of the function_type type.
void unset_is_pretty_printing()
Set the 'is_pretty_printing_' boolean to false.
void mark_as_being_compared(const function_type &first, const function_type &second) const
Mark a given pair of function_type as being compared.
void set_is_pretty_printing()
Set the 'is_pretty_printing_' boolean to true.
bool comparison_started(const function_type &first, const function_type &second) const
Tests if a function_type is currently being compared.
bool is_pretty_printing() const
Getter of the 'is_pretty_printing_' boolean.
void unmark_as_being_compared(const function_type &first, const function_type &second) const
Mark a given pair of function_type as being compared.
Functor used to sort types before hashing them.
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 type_base &f, const type_base &s)
"Less Than" operator for type IR nodes.
bool operator()(const type_base_sptr &f, const type_base_sptr &s)
"Less Than" operator for type IR nodes.
bool operator()(const type_base *f, const type_base *s)
"Less Than" operator for type IR nodes.
Private type to hold private members of translation_unit.
Definition of the private data of type_base.
The private data of type_or_decl_base.
void set_hashing_state(hashing::hashing_state s) const
Setter of the hashing state of the current IR node.
void is_recursive_artefact(bool f)
Setter of the property which flags the current artefact as being recursive or not.
void kind(enum type_or_decl_kind k)
Setter of the kind of the IR node.
void set_hash_value(hash_t h)
Setter of the hashing value of the current IR node.
enum type_or_decl_kind kind() const
Getter of the kind of the IR node.
priv(const environment &e, enum type_or_decl_kind k=ABSTRACT_TYPE_OR_DECL)
Constructor of the type_or_decl_base::priv private type.
bool is_recursive_artefact() const
Getter of the property which flags the current artefact as being recursive or not.
void force_set_hash_value(hash_t h)
Setter of the hashing value of the current IR node.
hashing::hashing_state get_hashing_state() const
Getter the hashing state of the current IR node.
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 type_base *t)
Test if a type has an artificial or natural location.
bool has_artificial_or_natural_location(const decl_base *d)
Test if a decl has an artificial or natural location.
bool operator()(const type_base_sptr &f, const type_base_sptr &s)
The "Less Than" comparison operator of this functor.
bool operator()(const type_base *f, const type_base *s)
The "Less Than" comparison operator of this functor.
The hashing functor for a pair of uint64_t.
uint64_t operator()(const std::pair< uint64_t, uint64_t > &p) const
Hashing function for a pair of uint64_t.