|
GCC Middle and Back End API Reference
|
#include <tree.h>
Public Types | |
| enum class | merge_error : unsigned char { disjoint_address_spaces , atomic_mismatch } |
| enum class | join_error : unsigned char { double_addr_space } |
Private Attributes | |
| cv_qualifier | m_cv_quals |
| addr_space_t | m_addr_space |
Friends | |
| constexpr bool | operator== (const qualifier_set &a, const qualifier_set &b) |
| constexpr bool | operator!= (const qualifier_set &a, const qualifier_set &b) |
A qualifier set is the aggregate of all qualifiers on a given type. It consists of the 'const', 'volatile', 'restrict', and 'atomic' qualification, which are all either present or absent, and an address space qualifier, which is always present (but possibly ADDR_SPACE_GENERIC).
|
strong |
|
strong |
|
default |
Referenced by join(), merge(), nonempty_p(), operator!=, operator==, and superset_of().
|
inlineconstexpr |
References ADDR_SPACE_GENERIC, cv_quals(), m_addr_space, and m_cv_quals.
|
inlineconstexpr |
References cv_quals(), m_addr_space, and m_cv_quals.
|
inlineconstexpr |
References m_cv_quals.
Referenced by with().
|
inlineconstexpr |
References m_addr_space.
Referenced by join(), merge(), set_type_quals(), split(), superset_of(), and symmetric_difference().
|
inlineconstexpr |
References m_cv_quals.
Referenced by intersect(), join(), merge(), qualifier_set(), qualifier_set(), split(), superset_of(), and symmetric_difference().
| DEBUG_FUNCTION void qualifier_set::debug | ( | ) | const |
|
inlineconstexpr |
References intersect().
Referenced by merge(), and set_type_quals().
|
inlineconstexpr |
References cv_quals().
Referenced by has().
| gcc::expected< qualifier_set, qualifier_set::join_error > qualifier_set::join | ( | qualifier_set | other | ) | const |
Return a qualifier set that has all the qualifiers of THIS and OTHER.
Unlike 'merge', this operation operates purely syntactically; if THIS is
{q1_1, q1_2, ..., q1_i} and OTHER {q2_1, q2_2, ..., q2_j}, then returns the
qualifier set obtained by concatenating the sequences q1 and q2 without
duplicates, if such a qualifier set is valid.
Specifically, this implies that if THIS or OTHER both (syntactically)
contain an address space qualifier, and they're different, the operation
fails (even if one is subset of the other).
This operation may fail. In that case, the error value returned provides
reasoning for the failure.
You'll need to include stdbackport/expected to use this.
References addr_space(), ADDR_SPACE_GENERIC, ADDR_SPACE_GENERIC_P, cv_quals(), and qualifier_set().
| gcc::expected< qualifier_set, qualifier_set::merge_error > qualifier_set::merge | ( | qualifier_set | other, |
| bool | strict_addr_space = false ) const |
Attempt to produce a qualifier_set that's a merge of qualifiers in THIS and OTHER. Such a qualifier set can be used instead of either THIS or OTHER safely. (i.e. if a type was qualified by either THIS or OTHER, it can be qualified by their merge instead safely, possibly through a conversion) This operation may fail. In that case, the error value returned provides reasoning for the failure. If STRICT_ADDR_SPACE, then no address space mismatch is permitted. This is useful if merging below the top-level of pointers (i.e. in a case such as 'AS1 T**' vs 'AS2 T**'). You'll need to include stdbackport/expected to use this.
References addr_space(), cv_quals(), has(), qualifier_set(), targetm, and TYPE_QUAL_ATOMIC.
|
inlineconstexpr |
References qualifier_set().
Referenced by operator bool().
|
inlineexplicitconstexpr |
References bool, and nonempty_p().
|
inlineconstexpr |
References m_cv_quals.
Referenced by without().
|
inlineconstexpr |
References m_addr_space.
Referenced by with_as().
|
inlineconstexpr |
References addr_space(), and cv_quals().
Referenced by dequeue_and_dump().
| bool qualifier_set::superset_of | ( | qualifier_set | other, |
| bool | pointee = false ) const |
Returns true if qualifiers in OTHER can be replaced with qualifiers in THIS safely. If !POINTEE, such a replacement is safe iff 'cv2 int *' can be converted into 'cv1 int *' where cv1 are the qualifiers in THIS and cv2 the qualifiers in OTHER. Otherwise, such a replacement is safe iff 'cv2 int * const *' can be converted into 'cv1 int * const *' with cv1 and cv2 as above.
References addr_space(), cv_quals(), qualifier_set(), targetm, and TYPE_QUAL_ATOMIC.
|
inlineconstexpr |
References addr_space(), and cv_quals().
Referenced by operator^(), and operator^().
|
inlineconstexpr |
References add().
Referenced by operator|(), and operator|().
|
inlineconstexpr |
References set_as().
|
inlineconstexpr |
References remove().
|
friend |
References a, b, and qualifier_set().
|
friend |
References a, b, and qualifier_set().
|
private |
Referenced by addr_space(), qualifier_set(), qualifier_set(), and set_as().
|
private |
Referenced by add(), cv_quals(), qualifier_set(), qualifier_set(), and remove().