summaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-09-29 19:16:46 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-09-29 19:16:46 -0700
commitde39930392eda3a8a298e70d07f997eba84c5afe (patch)
treefbb1057171256a79143187457974d34107bf3d8f /gcc/java/decl.c
parentd68acc044e8b214f490718612e1c2d1a122813eb (diff)
downloadgcc-de39930392eda3a8a298e70d07f997eba84c5afe.tar.gz
check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
* check-init.c (check_init): Handle USE_MAPPED_LOCATION case. * decl.c (finish_method, java_add_stmt): Likewise. * java-gimplify.c (java-gimplify.c): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lang.c (java_post_options): Likewise - call linemap_add. From-SVN: r88324
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 573fa2c9b08..e10c9914869 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1954,8 +1954,12 @@ finish_method (tree fndecl)
cfun = DECL_STRUCT_FUNCTION (fndecl);
else
allocate_struct_function (fndecl);
+#ifdef USE_MAPPED_LOCATION
+ cfun->function_end_locus = DECL_FUNCTION_LAST_LINE (fndecl);
+#else
cfun->function_end_locus.file = DECL_SOURCE_FILE (fndecl);
cfun->function_end_locus.line = DECL_FUNCTION_LAST_LINE (fndecl);
+#endif
/* Defer inlining and expansion to the cgraph optimizers. */
cgraph_finalize_function (fndecl, false);
@@ -2023,7 +2027,7 @@ tree
java_add_stmt (tree stmt)
{
if (input_filename)
- annotate_with_locus (stmt, input_location);
+ SET_EXPR_LOCATION (stmt, input_location);
return current_binding_level->stmts
= add_stmt_to_compound (current_binding_level->stmts,