aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@locrian.net>2021-09-19 00:07:40 -0400
committerJeff Law <jeffreyalaw@gmail.com>2021-09-19 00:08:21 -0400
commit69337e7495d09a1fc30442c9c3ade6318f1cf089 (patch)
treea2d5ff4685cd4dda3c96e14771323b725578adcd /gcc
parent767c098247a405041a48d6c1663100bfc29e414c (diff)
downloadgcc-69337e7495d09a1fc30442c9c3ade6318f1cf089.zip
gcc-69337e7495d09a1fc30442c9c3ade6318f1cf089.tar.gz
gcc-69337e7495d09a1fc30442c9c3ade6318f1cf089.tar.bz2
[PATCH] Remove unused function make_unique_name.
gcc/ * attribs.c (make_unique_name): Delete. * attribs.h (make_unique_name): Delete.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/attribs.c34
-rw-r--r--gcc/attribs.h1
2 files changed, 0 insertions, 35 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 0d22c20..83fafc9 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -1022,40 +1022,6 @@ common_function_versions (tree fn1, tree fn2)
return result;
}
-/* Return a new name by appending SUFFIX to the DECL name. If make_unique
- is true, append the full path name of the source file. */
-
-char *
-make_unique_name (tree decl, const char *suffix, bool make_unique)
-{
- char *global_var_name;
- int name_len;
- const char *name;
- const char *unique_name = NULL;
-
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
- /* Get a unique name that can be used globally without any chances
- of collision at link time. */
- if (make_unique)
- unique_name = IDENTIFIER_POINTER (get_file_function_name ("\0"));
-
- name_len = strlen (name) + strlen (suffix) + 2;
-
- if (make_unique)
- name_len += strlen (unique_name) + 1;
- global_var_name = XNEWVEC (char, name_len);
-
- /* Use '.' to concatenate names as it is demangler friendly. */
- if (make_unique)
- snprintf (global_var_name, name_len, "%s.%s.%s", name, unique_name,
- suffix);
- else
- snprintf (global_var_name, name_len, "%s.%s", name, suffix);
-
- return global_var_name;
-}
-
/* Make a dispatcher declaration for the multi-versioned function DECL.
Calls to DECL function will be replaced with calls to the dispatcher
by the front-end. Return the decl created. */
diff --git a/gcc/attribs.h b/gcc/attribs.h
index 87231b9..138c509 100644
--- a/gcc/attribs.h
+++ b/gcc/attribs.h
@@ -44,7 +44,6 @@ extern struct scoped_attributes* register_scoped_attributes (const struct attrib
extern char *sorted_attr_string (tree);
extern bool common_function_versions (tree, tree);
-extern char *make_unique_name (tree, const char *, bool);
extern tree make_dispatcher_decl (const tree);
extern bool is_function_default_version (const tree);