gcc/gcc41-java-bogus-debugline.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

2007-03-17 09:01:19 +00:00
2007-03-16 Andrew Haley <aph@redhat.com>
* class.c (push_class): Don't bogusly guess the source filename.
2007-04-03 13:14:16 +00:00
* jcf-parse.c (give_name_to_class): Don't set input_location from
DECL_ARTIFICIAL decls.
2007-03-17 09:01:19 +00:00
2007-04-03 13:14:16 +00:00
--- gcc/java/class.c (revision 122746)
+++ gcc/java/class.c (working copy)
2007-03-17 09:01:19 +00:00
@@ -426,8 +426,7 @@
tree decl, signature;
location_t saved_loc = input_location;
#ifndef USE_MAPPED_LOCATION
- tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
- input_filename = IDENTIFIER_POINTER (source_name);
+ input_filename = "<unknown>";
input_line = 0;
#endif
CLASS_P (class_type) = 1;
2007-04-03 13:14:16 +00:00
--- gcc/java/jcf-parse.c (revision 122746)
+++ gcc/java/jcf-parse.c (working copy)
2007-04-03 13:56:17 +00:00
@@ -1221,9 +1221,12 @@ give_name_to_class (JCF *jcf, int i)
main_input_filename = sfname;
2007-04-03 13:14:16 +00:00
}
#else
- input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
- if (main_input_filename == NULL && jcf == main_jcf)
2007-04-03 13:56:17 +00:00
- main_input_filename = input_filename;
2007-04-03 13:14:16 +00:00
+ if (! DECL_ARTIFICIAL (TYPE_NAME (this_class)))
2007-04-03 13:56:17 +00:00
+ {
+ input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
+ if (main_input_filename == NULL && jcf == main_jcf)
+ main_input_filename = input_filename;
+ }
2007-04-03 13:14:16 +00:00
#endif
jcf->cpool.data[i].t = this_class;