]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
toplev.c (output_clean_symbol_name): Remove.
authorNathan Sidwell <nathan@codesourcery.com>
Sat, 5 Jul 2003 16:11:53 +0000 (16:11 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sat, 5 Jul 2003 16:11:53 +0000 (16:11 +0000)
* toplev.c (output_clean_symbol_name): Remove.
* toplev.h (output_clean_symbol_name): Remove.
* config/alpha/alpha.c (unicosmk_output_module_name): Use
lbasename & clean_symbol_name.

From-SVN: r68978

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/toplev.c
gcc/toplev.h

index a8630de6daee9650c8bdc16d56efaeec88106d60..33ea3abd478afafa08a1dd87a53a79fabbd9eb9e 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-05  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * toplev.c (output_clean_symbol_name): Remove.
+       * toplev.h (output_clean_symbol_name): Remove.
+       * config/alpha/alpha.c (unicosmk_output_module_name): Use
+       lbasename & clean_symbol_name.
+
 2003-07-05  Kazu Hirata  <kazu@cs.umass.edu>
 
        * ggc.h: Follow spelling conventions.
index 927073f1c4a75dc0de8308c8ad0df052f1b940c5..df386deb937577abe0029ce0f64c13eff0ba5fda 100644 (file)
@@ -9278,22 +9278,19 @@ unicosmk_initial_elimination_offset (int from, int to)
 static void
 unicosmk_output_module_name (FILE *file)
 {
-  const char *name;
-
-  /* Strip directories.  */
-
-  name = strrchr (main_input_filename, '/');
-  if (name)
-    ++name;
-  else
-    name = main_input_filename;
-
+  const char *name = lbasename (main_input_filename);
+  unsigned len = strlen (name);
+  char *clean_name = alloca (len + 2);
+  char *ptr = clean_name;
+  
   /* CAM only accepts module names that start with a letter or '$'. We
      prefix the module name with a '$' if necessary.  */
 
   if (!ISALPHA (*name))
-    putc ('$', file);
-  output_clean_symbol_name (file, name);
+    *ptr++ = '$';
+  memcpy (ptr, name, len + 1);
+  clean_symbol_name (clean_name);
+  fputs (clean_name, file);
 }
 
 /* Output the definition of a common variable.  */
index 2f83d681e4672f7102c7f3a66b28c39ee4ec7077..33374679f64eab77842aef5833a226e590e4faf2 100644 (file)
@@ -1699,22 +1699,6 @@ output_quoted_string (FILE *asm_file, const char *string)
 #endif
 }
 
-/* Output NAME into FILE after having turned it into something
-   usable as an identifier in a target's assembly file.  */
-void
-output_clean_symbol_name (FILE *file, const char *name)
-{
-  /* Make a copy of NAME.  */
-  char *id = xstrdup (name);
-
-  /* Make it look like a valid identifier for an assembler.  */
-  clean_symbol_name (id);
-
-  fputs (id, file);
-  free (id);
-}
-
-
 /* Output a file name in the form wanted by System V.  */
 
 void
index 0be768f18bad27e6cf63485ce887f960704ddcd2..e750207b92365145cb8f56bf7a2e8f7ea29452aa 100644 (file)
@@ -89,7 +89,6 @@ extern void warning_for_asm           (struct rtx_def *,
                                         const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
 extern void warn_deprecated_use                (union tree_node *);
 
-extern void output_clean_symbol_name    (FILE *, const char *);
 #ifdef BUFSIZ
 extern void output_quoted_string       (FILE *, const char *);
 extern void output_file_directive      (FILE *, const char *);