aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-09-30 16:23:52 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-09-30 16:23:52 -0700
commit6744f40032f27c47186a71c87342efbb07663f5b (patch)
tree79f94a67e76920084496be1c8982996a4fea29d5 /gcc/java/class.c
parentde1041046f5bbd7ec8156777b3977d87113ef1db (diff)
downloadgcc-6744f40032f27c47186a71c87342efbb07663f5b.zip
gcc-6744f40032f27c47186a71c87342efbb07663f5b.tar.gz
gcc-6744f40032f27c47186a71c87342efbb07663f5b.tar.bz2
More cleanup for --enable-mapped-location.
* class.c (push_class): If USE_MAPPED_LOCATION don't set input_location here. Instead do it in give_name_to_class. (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out. * expr.c (expand_byte_code): Call linemap_line_start. * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE. (expr_add_location): New function, if USE_MAPPED_LOCATION. * class.c (maybe_layout_super_class): Adjust build_expr_wfl call to USE_MAPPED_LOCATION case. From-SVN: r88365
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 8797754..6a417a7 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -428,10 +428,12 @@ push_class (tree class_type, tree class_name)
{
tree decl, signature;
location_t saved_loc = input_location;
+#ifndef USE_MAPPED_LOCATION
tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
- CLASS_P (class_type) = 1;
input_filename = IDENTIFIER_POINTER (source_name);
input_line = 0;
+#endif
+ CLASS_P (class_type) = 1;
decl = build_decl (TYPE_DECL, class_name, class_type);
/* dbxout needs a DECL_SIZE if in gstabs mode */
@@ -1037,6 +1039,7 @@ build_class_ref (tree type)
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
make_decl_rtl (decl);
pushdecl_top_level (decl);
}
@@ -1996,9 +1999,14 @@ maybe_layout_super_class (tree super_class, tree this_class)
if (this_class)
{
tree this_decl = TYPE_NAME (this_class);
+#ifdef USE_MAPPED_LOCATION
+ this_wrap = build_expr_wfl (this_class,
+ DECL_SOURCE_LOCATION (this_decl));
+#else
this_wrap = build_expr_wfl (this_class,
DECL_SOURCE_FILE (this_decl),
DECL_SOURCE_LINE (this_decl), 0);
+#endif
}
super_class = do_resolve_class (NULL_TREE, /* FIXME? */
super_class, NULL_TREE, this_wrap);