Type of functions.
More...
#include <irep2_type.h>
|
| | code_type2t (const std::vector< type2tc > &args, const type2tc &ret, const std::vector< irep_idt > &names, bool e, const std::vector< irep_idt > &base_names={}, const std::vector< expr2tc > &defaults={}, const irep_idt &exc_kind=irep_idt(), const std::vector< irep_idt > &exc_types={}, const irep_idt &ret_marker=irep_idt(), bool implicit_union_copy_move=false, const std::vector< type2tc > &exc_decl={}) |
| | code_type2t (const code_type2t &ref)=default |
| unsigned int | get_width () const |
| virtual | ~type2t ()=default |
| unsigned int | get_width () const |
| | Fetch bit width of this type.
|
| bool | operator== (const type2t &ref) const |
| bool | operator!= (const type2t &ref) const |
| bool | operator< (const type2t &ref) const |
| std::string | pretty (unsigned int indent=0) const |
| | Produce a human-readable string representation of type.
|
| DUMP_METHOD void | dump () const |
| | Dump object string representation to stdout.
|
| size_t | crc () const |
| | Produce a checksum/hash of the current object.
|
| bool | cmp (const type2t &ref) const |
| | Structural comparison.
|
| int | lt (const type2t &ref) const |
| | Trinary structural ordering.
|
| list_of_memberst | tostring (unsigned int indent) const |
| | Extract a list of members from type as strings.
|
| type2tc | clone () const |
| | Clone method.
|
| template<typename T> |
| void | foreach_subtype (T &&t) const |
| template<typename T> |
| void | Foreach_subtype (T &&t) |
| | irep2t () noexcept |
| | irep2t (const irep2t &) noexcept |
| irep2t & | operator= (const irep2t &)=delete |
| virtual | ~irep2t ()=default |
| void | mark_writer () const noexcept |
| void | clear_writer () const noexcept |
◆ code_type2t() [1/2]
| code_type2t::code_type2t |
( |
const std::vector< type2tc > & | args, |
|
|
const type2tc & | ret, |
|
|
const std::vector< irep_idt > & | names, |
|
|
bool | e, |
|
|
const std::vector< irep_idt > & | base_names = {}, |
|
|
const std::vector< expr2tc > & | defaults = {}, |
|
|
const irep_idt & | exc_kind = irep_idt(), |
|
|
const std::vector< irep_idt > & | exc_types = {}, |
|
|
const irep_idt & | ret_marker = irep_idt(), |
|
|
bool | implicit_union_copy_move = false, |
|
|
const std::vector< type2tc > & | exc_decl = {} ) |
|
inline |
◆ code_type2t() [2/2]
◆ get_width()
| unsigned int code_type2t::get_width |
( |
| ) |
const |
◆ argument_base_names
| std::vector<irep_idt> code_type2t::argument_base_names |
The arguments' #base_names, carried across the migrate seam but not reflected: C11 6.7.6.3p15 makes a parameter's spelling no part of the function type, so two signatures differing only here are the same type and must hash and compare equal.
Kept because a consumer reads it back – clang_cpp_convert_vft.cpp's thunk argument loop does (docs/roadmap/frontends-to-irep2.md §44).
◆ argument_defaults
| std::vector<expr2tc> code_type2t::argument_defaults |
The arguments' #default_values, null where an argument has none, and empty when none has one.
Unreflected: a default is no part of the function's type. Carried because Python call lowering fills a missing argument from it (converter_funcall.cpp, function_call/expr.cpp).
◆ argument_names
| std::vector<irep_idt> code_type2t::argument_names |
◆ arguments
| std::vector<type2tc> code_type2t::arguments |
◆ ellipsis
| bool code_type2t::ellipsis |
◆ exception_decl
| std::vector<type2tc> code_type2t::exception_decl |
A dynamic specification's declared types before finalize_exception_specification resolves them to exception_types.
◆ exception_kind
◆ exception_types
| std::vector<irep_idt> code_type2t::exception_types |
A resolved C++ exception specification, as exception_spec_kind and exception_spec_types record it (util/lang/exception_specification.h); empty when there is none.
Unreflected, like the fields above: two signatures differing only here still compare equal. Carried because goto_convert_functions decodes it from the function symbol's type.
◆ excluded_field_bytes
| std::size_t code_type2t::excluded_field_bytes |
|
staticconstexpr |
Initial value:=
2 * sizeof(std::vector<irep_idt>) + sizeof(std::vector<expr2tc>) +
sizeof(std::vector<type2tc>) + 2 *
sizeof(
irep_idt) +
sizeof(
bool)
#define bool
Definition stdbool.h:9
◆ field_names
| std::string code_type2t::field_names |
|
static |
Initial value:=
{"arguments", "ret_type", "argument_names", "ellipsis", ""}
◆ fields
Initial value:= std::make_tuple(
std::vector< irep_idt > argument_names
Definition irep2_type.h:369
std::vector< type2tc > arguments
Definition irep2_type.h:367
type2tc ret_type
Definition irep2_type.h:368
bool ellipsis
Definition irep2_type.h:399
◆ implicit_union_copy_move
| bool code_type2t::implicit_union_copy_move |
◆ ret_type
◆ return_marker
A C++ constructor's or destructor's pseudo return type ("constructor" / "destructor"), which ret_type models as empty; and whether it is an implicit copy/move constructor of a union.
Unreflected, like the fields above. Carried because vptr initialisation and the union copy/move synthesis read them (docs/roadmap/frontends-to-irep2.md §50.2, scope-clang-cpp-irep2.md §12).
The documentation for this class was generated from the following files: