aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-07-07 10:20:12 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-07-07 10:20:12 +0000
commit56b8aa0c875022911e96cbe3c9f87a98e4ecd76b (patch)
treecb9596a739f084236484b459cb331d9799e513e8 /gcc/ada/gcc-interface/decl.c
parent86da71db787fdb592c9f8225665d3d8b7a3934fa (diff)
downloadgcc-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/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index def48f1..4ccb7f8 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -430,11 +430,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
|| Is_Public (gnat_entity));
/* Get the name of the entity and set up the line number and filename of
- the original definition for use in any decl we make. Make sure we do not
- inherit another source location. */
+ the original definition for use in any decl we make. Make sure we do
+ not inherit another source location. */
gnu_entity_name = get_entity_name (gnat_entity);
- if (Sloc (gnat_entity) != No_Location
- && !renaming_from_instantiation_p (gnat_entity))
+ if (!renaming_from_instantiation_p (gnat_entity))
Sloc_to_locus (Sloc (gnat_entity), &input_location);
/* For cases when we are not defining (i.e., we are referencing from