GCC Middle and Back End API Reference
lang_hooks_for_types Struct Reference

#include <langhooks.h>

Data Fields

tree(* make_type )(enum tree_code)
enum classify_record(* classify_record )(tree)
tree(* type_for_mode )(enum machine_mode, int)
tree(* type_for_size )(unsigned, int)
bool(* generic_p )(const_tree)
tree(* get_argument_pack_elems )(const_tree)
tree(* type_promotes_to )(tree)
void(* register_builtin_type )(tree, const char *)
void(* incomplete_type_error )(const_tree value, const_tree type)
tree(* max_size )(const_tree)
void(* omp_firstprivatize_type_sizes )(struct gimplify_omp_ctx *, tree)
bool(* omp_mappable_type )(tree type)
bool(* type_hash_eq )(const_tree, const_tree)
bool(* get_array_descr_info )(const_tree, struct array_descr_info *)
void(* get_subrange_bounds )(const_tree, tree *, tree *)
tree(* descriptive_type )(const_tree)
tree(* reconstruct_complex_type )(tree, tree)

Detailed Description

Hooks related to types.


Field Documentation

enum classify_record(* lang_hooks_for_types::classify_record)(tree)

Return what kind of RECORD_TYPE this is, mainly for purposes of debug information. If not defined, record types are assumed to be structures.

tree(* lang_hooks_for_types::descriptive_type)(const_tree)

A type descriptive of TYPE's complex layout generated to help the debugger to decode variable-length or self-referential constructs. This is only used for the AT_GNAT_descriptive_type DWARF attribute.

bool(* lang_hooks_for_types::generic_p)(const_tree)

True if the type is an instantiation of a generic type, e.g. C++ template implicit specializations.

tree(* lang_hooks_for_types::get_argument_pack_elems)(const_tree)

Returns the TREE_VEC of elements of a given generic argument pack.

bool(* lang_hooks_for_types::get_array_descr_info)(const_tree, struct array_descr_info *)

Return TRUE if TYPE uses a hidden descriptor and fills in information for the debugger about the array bounds, strides, etc.

void(* lang_hooks_for_types::get_subrange_bounds)(const_tree, tree *, tree *)

Fill in information for the debugger about the bounds of TYPE.

void(* lang_hooks_for_types::incomplete_type_error)(const_tree value, const_tree type)

This routine is called in tree.c to print an error message for invalid use of an incomplete type. VALUE is the expression that was used (or 0 if that isn't known) and TYPE is the type that was invalid.

tree(* lang_hooks_for_types::make_type)(enum tree_code)

Return a new type (with the indicated CODE), doing whatever language-specific processing is required.

Referenced by build_sender_ref(), and finalize_task_copyfn().

tree(* lang_hooks_for_types::max_size)(const_tree)

Called from assign_temp to return the maximum size, if there is one, for a type.

Referenced by nreverse().

void(* lang_hooks_for_types::omp_firstprivatize_type_sizes)(struct gimplify_omp_ctx *, tree)

Register language specific type size variables as potentially OpenMP firstprivate variables.

bool(* lang_hooks_for_types::omp_mappable_type)(tree type)

Return true if TYPE is a mappable type.

tree(* lang_hooks_for_types::reconstruct_complex_type)(tree, tree)

If we requested a pointer to a vector, build up the pointers that we stripped off while looking for the inner type. Similarly for return values from functions. The argument TYPE is the top of the chain, and BOTTOM is the new type which we will point to.

void(* lang_hooks_for_types::register_builtin_type)(tree, const char *)

Register TYPE as a builtin type with the indicated NAME. The TYPE is placed in the outermost lexical scope. The semantics should be analogous to:

typedef TYPE NAME;

in C. The default hook ignores the declaration.

tree(* lang_hooks_for_types::type_for_mode)(enum machine_mode, int)

Given MODE and UNSIGNEDP, return a suitable type-tree with that mode.

Referenced by build_one_array(), fold_mathfn_compare(), frame_offset_overflow(), lookup_tramp_for_decl(), and supportable_widening_operation().

tree(* lang_hooks_for_types::type_for_size)(unsigned, int)

Given PRECISION and UNSIGNEDP, return a suitable type-tree for an integer type with at least that precision.

Referenced by build_function_decl_skip_args(), convert_to_pointer(), and try_move_mult_to_index().

bool(* lang_hooks_for_types::type_hash_eq)(const_tree, const_tree)

Return TRUE if TYPE1 and TYPE2 are identical for type hashing purposes. Called only after doing all language independent checks. At present, this function is only called when both TYPE1 and TYPE2 are FUNCTION_TYPEs.

tree(* lang_hooks_for_types::type_promotes_to)(tree)

Given a type, apply default promotions to unnamed function arguments and return the new type. Return the same type if no change. Required by any language that supports variadic arguments. The default hook dies.


The documentation for this struct was generated from the following file: