diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-05-18 21:12:42 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-05-18 21:12:42 +0000 |
commit | 40e63ada2b6776980230aa4575e301aafda960d1 (patch) | |
tree | 95a1eed776ec8e3dad155bd2a5376e5400de517e /gcc | |
parent | dd25fe0a4bfad9fe6017e432ae741e549a77e0a5 (diff) | |
download | gcc-40e63ada2b6776980230aa4575e301aafda960d1.zip gcc-40e63ada2b6776980230aa4575e301aafda960d1.tar.gz gcc-40e63ada2b6776980230aa4575e301aafda960d1.tar.bz2 |
trans.c (Subprogram_Body_to_gnu): Rework comment and set function_start_locus.
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
set function_start_locus.
From-SVN: r210591
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 13e4df3..aa60d8a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2014-05-18 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and + set function_start_locus. + +2014-05-18 Eric Botcazou <ebotcazou@adacore.com> + * utils.c (gnat_write_global_declarations): Adjust the flags put on dummy_global. diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 581c57f..cd01d4d 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -3574,6 +3574,7 @@ Subprogram_Body_to_gnu (Node_Id gnat_node) /* The entry in the CI_CO_LIST that represents a function return, if any. */ tree gnu_return_var_elmt = NULL_TREE; tree gnu_result; + location_t locus; struct language_function *gnu_subprog_language; vec<parm_attr, va_gc> *cache; @@ -3610,14 +3611,15 @@ Subprogram_Body_to_gnu (Node_Id gnat_node) relayout_decl (gnu_result_decl); } - /* Set the line number in the decl to correspond to that of the body so that - the line number notes are written correctly. */ - Sloc_to_locus (Sloc (gnat_node), &DECL_SOURCE_LOCATION (gnu_subprog_decl)); + /* Set the line number in the decl to correspond to that of the body. */ + Sloc_to_locus (Sloc (gnat_node), &locus); + DECL_SOURCE_LOCATION (gnu_subprog_decl) = locus; /* Initialize the information structure for the function. */ allocate_struct_function (gnu_subprog_decl, false); gnu_subprog_language = ggc_cleared_alloc<language_function> (); DECL_STRUCT_FUNCTION (gnu_subprog_decl)->language = gnu_subprog_language; + DECL_STRUCT_FUNCTION (gnu_subprog_decl)->function_start_locus = locus; set_cfun (NULL); begin_subprog_body (gnu_subprog_decl); |