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,
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_;
232 is_recursive_artefact_(),
257 {
return hashing_state_;}
265 {
return is_recursive_artefact_;}
273 {is_recursive_artefact_ = f;}
280 {hashing_state_ = s;}
370 return hash_value(*tod);
416 const_cast<T&
>(tod).set_hash_value(h);
463 size_t alignment_in_bits;
464 size_t canonical_type_index;
482 canonical_type_index(),
483 naked_canonical_type()
488 type_base_sptr c = type_base_sptr())
490 alignment_in_bits(a),
491 canonical_type_index(),
493 naked_canonical_type(c.get())
541 mutable vector<type_base_sptr> sorted_canonical_types_;
542 type_base_sptr void_type_;
543 type_base_sptr void_pointer_type_;
544 type_base_sptr variadic_marker_type_;
561 vector<type_base_sptr> extra_live_types_;
599 vector<const type_base*> left_type_comp_operands_;
600 vector<const type_base*> right_type_comp_operands_;
602#ifdef WITH_DEBUG_SELF_COMPARISON
617 unordered_map<string, uintptr_t> type_id_canonical_type_map_;
620 unordered_map<uintptr_t, string> pointer_type_id_map_;
622 bool canonicalization_started_;
623 bool canonicalization_is_done_;
624 bool decl_only_class_equals_definition_;
625 bool use_enum_binary_only_equality_;
626 bool allow_type_comparison_results_caching_;
629#ifdef WITH_DEBUG_SELF_COMPARISON
630 bool self_comparison_debug_on_;
632#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
637 bool use_canonical_type_comparison_;
645 bool debug_type_canonicalization_;
646 bool debug_die_canonicalization_;
650 : canonicalization_started_(),
651 canonicalization_is_done_(),
652 decl_only_class_equals_definition_(
false),
653 use_enum_binary_only_equality_(
true),
654 allow_type_comparison_results_caching_(
false),
656#ifdef WITH_DEBUG_SELF_COMPARISON
658 self_comparison_debug_on_(
false)
660#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
662 use_canonical_type_comparison_(
true),
663 debug_type_canonicalization_(
false),
664 debug_die_canonicalization_(
false)
675 {allow_type_comparison_results_caching_ = f;}
686 {
return allow_type_comparison_results_caching_;}
713 type_comparison_results_cache_.emplace
714 (std::make_pair(
reinterpret_cast<uint64_t
>(&first),
715 reinterpret_cast<uint64_t
>(&second)),
746 type_comparison_result_type::const_iterator it =
747 type_comparison_results_cache_.find
748 (std::make_pair(
reinterpret_cast<uint64_t
>(&first),
749 reinterpret_cast<uint64_t
>(&second)));
750 if (it == type_comparison_results_cache_.end())
760 {type_comparison_results_cache_.clear();}
777 left_type_comp_operands_.push_back(left);
778 right_type_comp_operands_.push_back(right);
798 const type_base *t = left_type_comp_operands_.back();
800 t = right_type_comp_operands_.back();
803 left_type_comp_operands_.pop_back();
804 right_type_comp_operands_.pop_back();
807#ifdef WITH_DEBUG_SELF_COMPARISON
809 const unordered_map<string, uintptr_t>&
810 get_type_id_canonical_type_map()
const
811 {
return type_id_canonical_type_map_;}
813 unordered_map<string, uintptr_t>&
814 get_type_id_canonical_type_map()
815 {
return type_id_canonical_type_map_;}
817 const unordered_map<uintptr_t, string>&
818 get_pointer_type_id_map()
const
819 {
return pointer_type_id_map_;}
821 unordered_map<uintptr_t, string>&
822 get_pointer_type_id_map()
823 {
return pointer_type_id_map_;}
826 get_type_id_from_pointer(uintptr_t ptr)
const
828 auto it = get_pointer_type_id_map().find(ptr);
829 if (it != get_pointer_type_id_map().end())
835 get_type_id_from_type(
const type_base *t)
const
836 {
return get_type_id_from_pointer(
reinterpret_cast<uintptr_t
>(t));}
839 get_canonical_type_from_type_id(
const char* type_id)
const
843 auto it = get_type_id_canonical_type_map().find(type_id);
844 if (it != get_type_id_canonical_type_map().end())
862 check_canonical_type_from_abixml_during_self_comp(
const type_base* t,
865 if (!t || !t->get_corpus() || !c)
868 if (!(t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN))
874 unordered_map<uintptr_t, string>::const_iterator it =
875 pointer_type_id_map_.find(
reinterpret_cast<uintptr_t
>(t));
876 if (it == pointer_type_id_map_.end())
880 type_id = it->second;
885 type_base *original_canonical_type =
nullptr;
886 if (!type_id.empty())
888 unordered_map<string, uintptr_t>::const_iterator it =
889 type_id_canonical_type_map_.find(type_id);
890 if (it == type_id_canonical_type_map_.end())
892 original_canonical_type =
reinterpret_cast<type_base*
>(it->second);
901 if (original_canonical_type == c)
917 check_abixml_canonical_type_propagation_during_self_comp(
const type_base* t)
920 && t->get_corpus()->get_origin() == ir::corpus::NATIVE_XML_ORIGIN)
922 type_base* c = t->get_naked_canonical_type();
923 if (c && !check_canonical_type_from_abixml_during_self_comp(t, c))
925 string repr = t->get_pretty_representation(
true,
true);
926 string type_id = get_type_id_from_type(t);
927 std::cerr <<
"error: canonical type propagation error for '"
936 <<
", should have had canonical type: "
938 << get_canonical_type_from_type_id(type_id.c_str())
958 check_canonical_type_from_abixml_during_self_comp(
const type_base_sptr& t,
959 const type_base_sptr& c)
961 return check_canonical_type_from_abixml_during_self_comp(t.get(), c.get());
1043 else if (!!fl != !!sl)
1069 const decl_base_sptr &s)
1117 const type_base_sptr &s)
1131 if (f == s || !f || !s)
1144 == corpus::NATIVE_XML_ORIGIN))))
1150 if (f_is_ptr_ref_or_qual != s_is_ptr_ref_or_qual)
1151 return !f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual;
1153 if (f_is_ptr_ref_or_qual && s_is_ptr_ref_or_qual
1163 if (q->get_cv_quals() == qualified_type_def::CV_NONE)
1226 s1 =
is_typedef(f)->get_underlying_type()->get_cached_pretty_representation(
false);
1227 s2 =
is_typedef(s)->get_underlying_type()->get_cached_pretty_representation(
false);
1246 if (m_f->get_is_const() != m_s->get_is_const())
1247 return m_f->get_is_const();
1251 if (m_f->get_is_for_static_method() != m_s->get_is_for_static_method())
1252 return m_f->get_is_for_static_method() < m_s->get_is_for_static_method();
1274 if (h_f && h_s && *h_f != *h_s)
1280 return cti_f < cti_s;
1288 return decl_comp(fd, sd);
1310 if (k & type_or_decl_base::BASIC_TYPE)
1312 if (k & type_or_decl_base::SUBRANGE_TYPE)
1314 else if (k & type_or_decl_base::ENUM_TYPE)
1316 else if (k & type_or_decl_base::CLASS_TYPE)
1318 else if (k & type_or_decl_base::UNION_TYPE)
1320 else if (k & type_or_decl_base::FUNCTION_TYPE)
1322 else if (k & type_or_decl_base::METHOD_TYPE)
1324 else if (k & type_or_decl_base::TYPEDEF_TYPE)
1326 else if (k & type_or_decl_base::QUALIFIED_TYPE)
1328 else if (k & type_or_decl_base::POINTER_TYPE)
1330 else if (k & type_or_decl_base::REFERENCE_TYPE)
1332 else if (k & type_or_decl_base::POINTER_TO_MEMBER_TYPE)
1334 else if (k & type_or_decl_base::ARRAY_TYPE)
1361 bool result =
false;
1362 if (rank_f < rank_s)
1364 else if (rank_f == rank_s)
1367 result = comp(&f,&s);
1414template <
typename IteratorType>
1420 return std::stable_sort(begin, end, comp);
1457template<
typename input_iterator,
1458 typename deref_lambda>
1461 const input_iterator& end,
1463 bool do_log =
false,
1464 bool show_stats =
false)
1469 auto first_iter = begin;
1470 auto first = deref(first_iter);
1481 std::cerr <<
"Canonicalizing types ...\n";
1485 for (t = begin,i = 0; t != end; ++t, ++i)
1487 if (do_log && show_stats)
1488 std::cerr <<
"#" << std::dec << i <<
" ";
1498 std::cerr <<
"Canonicalizing of types DONE in: " << tmr <<
"\n\n";
1519template <
typename IteratorType,
1520 typename deref_lambda>
1525 bool do_log =
false,
1526 bool show_stats =
false)
1531 std::cerr <<
"sorting types before canonicalization ... \n";
1540 std::cerr <<
"sorted types for c14n in: " << tmr <<
"\n\n";
1542 std::cerr <<
"hashing types before c14n ...\n";
1546 for (IteratorType t = begin; t != end; ++t)
1553 std::cerr <<
"hashed types in: " << tmr <<
"\n\n";
1576template <
typename IteratorType,
1577 typename deref_lambda>
1600 member_function_templates member_function_templates_;
1601 member_class_templates member_class_templates_;
1602 bool is_printing_flat_representation_ =
false;
1609 : data_members_(data_mbrs),
1610 member_functions_(mbr_fns)
1612 for (
const auto& data_member: data_members_)
1614 static_data_members_.push_back(data_member);
1616 non_static_data_members_.push_back(data_member);
1639 env.priv_->left_classes_being_compared_.insert(&first);
1640 env.priv_->right_classes_being_compared_.insert(&second);
1678 const class_or_union_sptr& second)
const
1701 env.priv_->left_classes_being_compared_.erase(&first);
1702 env.priv_->right_classes_being_compared_.erase(&second);
1723 if (!first || !second)
1742 return (env.priv_->left_classes_being_compared_.count(&first)
1743 || env.priv_->right_classes_being_compared_.count(&second)
1744 || env.priv_->right_classes_being_compared_.count(&first)
1745 || env.priv_->left_classes_being_compared_.count(&second));
1760 if (first && second)
1773 {is_printing_flat_representation_ =
true;}
1783 {is_printing_flat_representation_ =
false;}
1793 {
return is_printing_flat_representation_;}
1806 bool is_pretty_printing_ =
false;
1811 type_base_sptr return_type)
1813 return_type_(return_type)
1816 priv(type_base_sptr return_type)
1817 : return_type_(return_type)
1833 env.priv_->left_fn_types_being_compared_.insert(&first);
1834 env.priv_->right_fn_types_being_compared_.insert(&second);
1850 env.priv_->left_fn_types_being_compared_.erase(&first);
1851 env.priv_->right_fn_types_being_compared_.erase(&second);
1865 return (env.priv_->left_fn_types_being_compared_.count(&first)
1867 env.priv_->right_fn_types_being_compared_.count(&second));
1878 {is_pretty_printing_ =
true;}
1888 {is_pretty_printing_ =
false;}
1898 {
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.
vector< method_decl_sptr > member_functions
Convenience typedef.
unordered_map< string, method_decl * > string_mem_fn_ptr_map_type
Convenience typedef.
vector< var_decl_sptr > data_members
Convenience typedef.
unordered_map< string, method_decl_sptr > string_mem_fn_sptr_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...
std::unordered_map< string, std::vector< type_base_sptr > > canonical_types_map_type
A convenience typedef for a map of canonical types. The key is the pretty representation string of a ...
bool 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.
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.
language
The language of the translation unit.
shared_ptr< scope_decl > global_scope_sptr
Convenience typedef for a shared pointer on a global_scope.
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.
hash_t hash(uint64_t v, uint64_t seed)
Hash an integer value and combine it with a hash previously computed.
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.
@ HASHING_CYCLED_TYPE_STATE
A cycle has been detected in the graph on the current node node.
@ 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.
type_base_sptr canonicalize(type_base_sptr t, bool do_log, bool show_stats)
Compute the canonical type of a given type.
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.
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.