aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/gigi.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-11-30 11:50:53 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-11-30 11:50:53 +0000
commit2056c5ede5306b0a0ad948d8409c5f7484ee65bf (patch)
treedcd71d54265ff238bf0e079a7cf34b93eac626bb /gcc/ada/gcc-interface/gigi.h
parent933a73251d95fb930028cb76eee7a892f41f867b (diff)
downloadgcc-2056c5ede5306b0a0ad948d8409c5f7484ee65bf.zip
gcc-2056c5ede5306b0a0ad948d8409c5f7484ee65bf.tar.gz
gcc-2056c5ede5306b0a0ad948d8409c5f7484ee65bf.tar.bz2
gigi.h (create_var_decl): Adjust prototype.
* gcc-interface/gigi.h (create_var_decl): Adjust prototype. (create_subprog_decl): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Rename static_p into static_flag and add volatile_flag local variable. Do not locally change the type of a volatile object, except for the pointed-to type if the object is handled by reference. Adjust calls to create_var_decl. <E_Subprogram_Type>: Likewise for const and noreturn subprograms. (get_minimal_subprog_decl): Adjust call to create_subprog_decl. (elaborate_expression_1): Adjust call to create_var_decl. (gnat_to_gnu_field): Minor tweak. * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and create_subprog_decl. (build_raise_check): Likewise. (Subprogram_Body_to_gnu): Likewise. (create_temporary): Likewise. (Handled_Sequence_Of_Statements_to_gnu): Likewise. (Exception_Handler_to_gnu_gcc): Likewise. (Compilation_Unit_to_gnu): Likewise. (gnat_to_gnu): Likewise. * gcc-interface/utils.c (maybe_pad_type): Likewise. (create_var_decl): Add VOLATILE_FLAG parameter and handle it. (create_subprog_decl): Add CONST_FLAG and VOLATILE_FLAG parameters and handle them. From-SVN: r231065
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r--gcc/ada/gcc-interface/gigi.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index e98e7e6..a6c7d42 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -685,8 +685,10 @@ extern tree create_type_decl (tree name, tree type, bool artificial_p,
EXTERN_FLAG is nonzero when processing an external variable declaration (as
opposed to a definition: no storage is to be allocated for the variable).
- STATIC_FLAG is only relevant when not at top level. In that case
- it indicates whether to always allocate storage to the variable.
+ STATIC_FLAG is only relevant when not at top level and indicates whether
+ to always allocate storage to the variable.
+
+ VOLATILE_FLAG is true if this variable is declared as volatile.
ARTIFICIAL_P is true if the variable was generated by the compiler.
@@ -696,6 +698,7 @@ extern tree create_type_decl (tree name, tree type, bool artificial_p,
extern tree create_var_decl (tree name, tree asm_name, tree type, tree init,
bool const_flag, bool public_flag,
bool extern_flag, bool static_flag,
+ bool volatile_flag,
bool artificial_p, bool debug_info_p,
struct attrib *attr_list, Node_Id gnat_node,
bool const_decl_allowed_p = true);
@@ -725,8 +728,8 @@ extern tree create_label_decl (tree name, Node_Id gnat_node);
the list of its parameters (a list of PARM_DECL nodes chained through the
DECL_CHAIN field).
- INLINE_STATUS, PUBLIC_FLAG, EXTERN_FLAG and ATTR_LIST are used to set the
- appropriate fields in the FUNCTION_DECL.
+ INLINE_STATUS, CONST_FLAG, PUBLIC_FLAG, EXTERN_FLAG, VOLATILE_FLAG as well
+ as ATTR_LIST are used to set the appropriate fields in the FUNCTION_DECL.
ARTIFICIAL_P is true if the subprogram was generated by the compiler.
@@ -736,7 +739,8 @@ extern tree create_label_decl (tree name, Node_Id gnat_node);
extern tree create_subprog_decl (tree name, tree asm_name, tree type,
tree param_decl_list,
enum inline_status_t inline_status,
- bool public_flag, bool extern_flag,
+ bool const_flag, bool public_flag,
+ bool extern_flag, bool volatile_flag,
bool artificial_p, bool debug_info_p,
struct attrib *attr_list, Node_Id gnat_node);