aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-05-24 09:31:33 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-05-24 09:31:33 +0000
commit0e24192cc9ae888874557a6caeace67131724c03 (patch)
treed6c908246fe03d3720172f85abf3377381bf02f9 /gcc/ada/gcc-interface/utils.c
parent828012a527877b954f10ea4cda161b4c9860d69d (diff)
downloadgcc-0e24192cc9ae888874557a6caeace67131724c03.zip
gcc-0e24192cc9ae888874557a6caeace67131724c03.tar.gz
gcc-0e24192cc9ae888874557a6caeace67131724c03.tar.bz2
gigi.h (enum inline_status_t): New type.
* gcc-interface/gigi.h (enum inline_status_t): New type. (create_subprog_decl): Adjust prototype. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust calls to create_subprog_decl. (get_minimal_subprog_decl): Likewise. * gcc-interface/trans.c (gigi): Likewise. (build_raise_check): Likewise. (establish_gnat_vms_condition_handler): Likewise. (Compilation_Unit_to_gnu): Likewise. (gnat_to_gnu): Likewise. * gcc-interface/utils.c (create_subprog_decl): Change inline_flag parameter to inline_status and implement for suppressed inlining. From-SVN: r199286
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 309cff6..0906c0c 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2013, 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- *
@@ -2621,14 +2621,14 @@ create_label_decl (tree label_name, Node_Id gnat_node)
node), PARAM_DECL_LIST is the list of the subprogram arguments (a list of
PARM_DECL nodes chained through the DECL_CHAIN field).
- INLINE_FLAG, PUBLIC_FLAG, EXTERN_FLAG, ARTIFICIAL_FLAG and ATTR_LIST are
+ INLINE_STATUS, PUBLIC_FLAG, EXTERN_FLAG, ARTIFICIAL_FLAG and ATTR_LIST are
used to set the appropriate fields in the FUNCTION_DECL. GNAT_NODE is
used for the position of the decl. */
tree
create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
- tree param_decl_list, bool inline_flag, bool public_flag,
- bool extern_flag, bool artificial_flag,
+ tree param_decl_list, enum inline_status_t inline_status,
+ bool public_flag, bool extern_flag, bool artificial_flag,
struct attrib *attr_list, Node_Id gnat_node)
{
tree subprog_decl = build_decl (input_location, FUNCTION_DECL, subprog_name,
@@ -2642,7 +2642,7 @@ create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
function in the current unit since it is private to the other unit.
We could inline the nested function as well but it's probably better
to err on the side of too little inlining. */
- if (!inline_flag
+ if (inline_status != is_enabled
&& !public_flag
&& current_function_decl
&& DECL_DECLARED_INLINE_P (current_function_decl)
@@ -2651,8 +2651,24 @@ create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
DECL_ARTIFICIAL (subprog_decl) = artificial_flag;
DECL_EXTERNAL (subprog_decl) = extern_flag;
- DECL_DECLARED_INLINE_P (subprog_decl) = inline_flag;
- DECL_NO_INLINE_WARNING_P (subprog_decl) = inline_flag && artificial_flag;
+
+ switch (inline_status)
+ {
+ case is_suppressed:
+ DECL_UNINLINABLE (subprog_decl) = 1;
+ break;
+
+ case is_disabled:
+ break;
+
+ case is_enabled:
+ DECL_DECLARED_INLINE_P (subprog_decl) = 1;
+ DECL_NO_INLINE_WARNING_P (subprog_decl) = artificial_flag;
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
TREE_PUBLIC (subprog_decl) = public_flag;
TREE_READONLY (subprog_decl) = TYPE_READONLY (subprog_type);