diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-07-07 10:20:12 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-07-07 10:20:12 +0000 |
commit | 56b8aa0c875022911e96cbe3c9f87a98e4ecd76b (patch) | |
tree | cb9596a739f084236484b459cb331d9799e513e8 /gcc/ada/gcc-interface/utils.c | |
parent | 86da71db787fdb592c9f8225665d3d8b7a3934fa (diff) | |
download | gcc-56b8aa0c875022911e96cbe3c9f87a98e4ecd76b.zip gcc-56b8aa0c875022911e96cbe3c9f87a98e4ecd76b.tar.gz gcc-56b8aa0c875022911e96cbe3c9f87a98e4ecd76b.tar.bz2 |
gigi.h (add_decl_expr): Adjust prototype.
* gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
* gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
(add_decl_expr): Change type of second parameter and rename it.
(renaming_from_instantiation_p): New function moved from...
(set_expr_location_from_node): Test for exceptions here and add one
for actual subtypes built for unconstrained composite actuals.
* gcc-interface/utils.c (renaming_from_instantiation_p): ...here.
From-SVN: r262497
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index e0e5cfe..af85a0f 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -2938,37 +2938,6 @@ value_factor_p (tree value, HOST_WIDE_INT factor) return false; } -/* Return whether GNAT_NODE is a defining identifier for a renaming that comes - from the parameter association for the instantiation of a generic. We do - not want to emit source location for them: the code generated for their - initialization is likely to disturb debugging. */ - -bool -renaming_from_instantiation_p (Node_Id gnat_node) -{ - if (Nkind (gnat_node) != N_Defining_Identifier - || !Is_Object (gnat_node) - || Comes_From_Source (gnat_node) - || !Present (Renamed_Object (gnat_node))) - return false; - - /* Get the object declaration of the renamed object, if any and if the - renamed object is a mere identifier. */ - gnat_node = Renamed_Object (gnat_node); - if (Nkind (gnat_node) != N_Identifier) - return false; - - gnat_node = Entity (gnat_node); - if (!Present (Parent (gnat_node))) - return false; - - gnat_node = Parent (gnat_node); - return - (Present (gnat_node) - && Nkind (gnat_node) == N_Object_Declaration - && Present (Corresponding_Generic_Association (gnat_node))); -} - /* Defer the initialization of DECL's DECL_CONTEXT attribute, scheduling to feed it with the elaboration of GNAT_SCOPE. */ |