diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-07 09:41:40 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-07 09:41:40 +0000 |
commit | 10069d53fb535c72d70e2c7dab53347d40a89f37 (patch) | |
tree | 7bfd8c79bf5aaa359b8138379bc370dafdabe883 /gcc/ada/gcc-interface/gigi.h | |
parent | 1e17ef870e0889e68c707702cb9bb528aa960aa5 (diff) | |
download | gcc-10069d53fb535c72d70e2c7dab53347d40a89f37.zip gcc-10069d53fb535c72d70e2c7dab53347d40a89f37.tar.gz gcc-10069d53fb535c72d70e2c7dab53347d40a89f37.tar.bz2 |
gigi.h (standard_datatypes): Remove ADT_void_type_decl.
* gcc-interface/gigi.h (standard_datatypes): Remove ADT_void_type_decl.
(void_type_decl_node): Remove.
(init_gigi_decls): Likewise.
(gnat_install_builtins): Declare.
(record_builtin_type): Likewise.
(create_type_stub_decl): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Void>: Use void_type.
(gnat_to_gnu_entity) <E_Array_Type>: Make fat and thin pointer types
artificial.
<E_Array_Subtype>: Use the index types, not only their name, in the
record giving the names of the bounds, if any.
For a packed array type, make it artificial only if the base type
was artificial as well. Remove redundant statement.
(gnat_to_gnu_entity) <E_Incomplete_Type>: Do not create TYPE_DECL for
dummy types.
Use create_type_stub_decl to build the TYPE_STUB_DECL of types.
(rest_of_type_decl_compilation_no_defer): Likewise.
* gcc-interface/misc.c (gnat_printable_name): Add missing guard.
* gcc-interface/utils.c (make_dummy_type): Always create TYPE_STUB_DECL
and use create_type_stub_decl to build it.
(gnat_pushdecl): Rewrite condition.
(gnat_install_builtins): Remove bogus declaration.
(record_builtin_type): New function.
(finish_record_type): Use create_type_stub_decl to build TYPE_STUB_DECL
of types.
(create_type_stub_decl): New function.
(create_type_decl): Assert that the type is not dummy. If the type
hasn't been named yet, equate the TYPE_STUB_DECL to the created node.
(build_vms_descriptor32): Do not create TYPE_DECL for the descriptor.
(build_vms_descriptor): Likewise.
(init_gigi_decls): Delete and move bulk of code to...
* gcc-interface/trans.c (gigi): ...here. Use record_builtin_type.
(emit_range_check): Add gnat_node parameter.
(emit_index_check): Likewise.
(emit_check): Likewise.
(build_unary_op_trapv): Likewise.
(build_binary_op_trapv): Likewise.
(convert_with_check): Likewise.
(Attribute_to_gnu): Adjust calls for above changes.
(call_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
(assoc_to_constructor): Likewise.
(pos_to_constructor): Likewise.
(Sloc_to_locus): Set BUILTINS_LOCATION for Standard_Location nodes.
(process_type): Do not create TYPE_DECL for dummy types.
From-SVN: r145660
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 7b08f8d..ffd1767 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 1992-2008, Free Software Foundation, Inc. * + * Copyright (C) 1992-2009, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -363,9 +363,8 @@ extern const struct attribute_spec gnat_internal_attribute_table[]; /* Define the entries in the standard data array. */ enum standard_datatypes { -/* Various standard data types and nodes. */ + /* The longest floating-point type. */ ADT_longest_float_type, - ADT_void_type_decl, /* The type of an exception. */ ADT_except_type, @@ -418,7 +417,6 @@ extern GTY(()) tree gnat_std_decls[(int) ADT_LAST]; extern GTY(()) tree gnat_raise_decls[(int) LAST_REASON_CODE + 1]; #define longest_float_type_node gnat_std_decls[(int) ADT_longest_float_type] -#define void_type_decl_node gnat_std_decls[(int) ADT_void_type_decl] #define except_type_node gnat_std_decls[(int) ADT_except_type] #define ptr_void_type_node gnat_std_decls[(int) ADT_ptr_void_type] #define void_ftype gnat_std_decls[(int) ADT_void_ftype] @@ -468,8 +466,8 @@ extern tree get_block_jmpbuf_decl (void); extern void gnat_pushdecl (tree decl, Node_Id gnat_node); extern void gnat_init_decl_processing (void); -extern void init_gigi_decls (tree long_long_float_type, tree exception_type); extern void gnat_init_gcc_eh (void); +extern void gnat_install_builtins (void); /* Return an integer type with the number of bits of precision given by PRECISION. UNSIGNEDP is nonzero if the type is unsigned; otherwise @@ -522,6 +520,9 @@ extern bool present_gnu_tree (Entity_Id gnat_entity); /* Initialize tables for above routines. */ extern void init_gnat_to_gnu (void); +/* Record TYPE as a builtin type for Ada. NAME is the name of the type. */ +extern void record_builtin_type (const char *name, tree type); + /* Given a record type RECORD_TYPE and a chain of FIELD_DECL nodes FIELDLIST, finish constructing the record or union type. If REP_LEVEL is zero, this record has no representation clause and so will be entirely laid out here. @@ -569,12 +570,16 @@ extern tree copy_type (tree type); extern tree create_index_type (tree min, tree max, tree index, Node_Id gnat_node); -/* Return a TYPE_DECL node. TYPE_NAME gives the name of the type (a character - string) and TYPE is a ..._TYPE node giving its data type. - ARTIFICIAL_P is true if this is a declaration that was generated - by the compiler. DEBUG_INFO_P is true if we need to write debugging - information about this type. GNAT_NODE is used for the position of - the decl. */ +/* Return a TYPE_DECL node suitable for the TYPE_STUB_DECL field of a type. + TYPE_NAME gives the name of the type and TYPE is a ..._TYPE node giving + its data type. */ +extern tree create_type_stub_decl (tree type_name, tree type); + +/* Return a TYPE_DECL node. TYPE_NAME gives the name of the type and TYPE + is a ..._TYPE node giving its data type. ARTIFICIAL_P is true if this + is a declaration that was generated by the compiler. DEBUG_INFO_P is + true if we need to write debug information about this type. GNAT_NODE + is used for the position of the decl. */ extern tree create_type_decl (tree type_name, tree type, struct attrib *attr_list, bool artificial_p, bool debug_info_p, |