public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5520] Remove dead code and function
@ 2021-11-25 13:24 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-11-25 13:24 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4eda2eee0e1808b2b3a77afde3062e2cb9a24597
commit r12-5520-g4eda2eee0e1808b2b3a77afde3062e2cb9a24597
Author: Richard Biener <rguenther@suse.de>
Date: Wed Nov 24 15:57:03 2021 +0100
Remove dead code and function
The only use of get_alias_symbol is gated by a gcc_unreachable (),
so the following patch gets rid of it.
2021-11-24 Richard Biener <rguenther@suse.de>
* cgraphunit.c (symbol_table::output_weakrefs): Remove
unreachable init.
(get_alias_symbol): Remove now unused function.
Diff:
---
gcc/cgraphunit.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 1e58ffd65e8..3a803a34cbc 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2222,17 +2222,6 @@ ipa_passes (void)
}
-/* Return string alias is alias of. */
-
-static tree
-get_alias_symbol (tree decl)
-{
- tree alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl));
- return get_identifier (TREE_STRING_POINTER
- (TREE_VALUE (TREE_VALUE (alias))));
-}
-
-
/* Weakrefs may be associated to external decls and thus not output
at expansion time. Emit all necessary aliases. */
@@ -2259,10 +2248,7 @@ symbol_table::output_weakrefs (void)
else if (node->analyzed)
target = DECL_ASSEMBLER_NAME (node->get_alias_target ()->decl);
else
- {
- gcc_unreachable ();
- target = get_alias_symbol (node->decl);
- }
+ gcc_unreachable ();
do_assemble_alias (node->decl, target);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-25 13:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 13:24 [gcc r12-5520] Remove dead code and function Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).