]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jcf-parse.c (set_source_filename): Set the decl source location even when returning...
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 16 Dec 2005 17:27:21 +0000 (17:27 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 16 Dec 2005 17:27:21 +0000 (17:27 +0000)
* jcf-parse.c (set_source_filename): Set the decl source location
even when returning early.

From-SVN: r108662

gcc/java/ChangeLog
gcc/java/jcf-parse.c

index 9843b6cbedd725bfd3748b38b2acb8fec30c79d2..97e309c2c0bc858fd68beb66888efd675e14862f 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
+
+       * jcf-parse.c (set_source_filename): Set the decl source location
+       even when returning early.
+
 2005-12-15  Tom Tromey  <tromey@redhat.com>
            Andrew Haley  <aph@redhat.com>
 
index 5d22f88d843b346c9f83fcd3b26123f432ddc825..4bc12f4d98a69aaf73533a27effb134c1eb3922f 100644 (file)
@@ -142,7 +142,13 @@ set_source_filename (JCF *jcf, int index)
          && strcmp (sfname, old_filename + old_len - new_len) == 0
          && (old_filename[old_len - new_len - 1] == '/'
              || old_filename[old_len - new_len - 1] == '\\'))
-       return;
+       {
+#ifndef USE_MAPPED_LOCATION
+         DECL_SOURCE_LOCATION (TYPE_NAME (current_class)) = input_location;
+         file_start_location = input_location;
+#endif
+         return;
+       }
     }
   if (strchr (sfname, '/') == NULL && strchr (sfname, '\\') == NULL)
     {