diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-30 23:23:52 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-30 23:23:52 +0000 |
commit | a90a67646152207cfb59bf4288a0e0e90e706ef8 (patch) | |
tree | 79f94a67e76920084496be1c8982996a4fea29d5 /gcc/java/class.c | |
parent | 8c4ec7dfc7af0b150210026e1712dfda7062d48a (diff) | |
download | gcc-a90a67646152207cfb59bf4288a0e0e90e706ef8.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 879775455b1..6a417a7ff1b 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); |