From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 395353858406; Thu, 25 Nov 2021 13:24:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 395353858406 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5520] Remove dead code and function X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 8addb0b1279433de1e51a5ed4eb20a71bbd76f9f X-Git-Newrev: 4eda2eee0e1808b2b3a77afde3062e2cb9a24597 Message-Id: <20211125132436.395353858406@sourceware.org> Date: Thu, 25 Nov 2021 13:24:36 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2021 13:24:36 -0000 https://gcc.gnu.org/g:4eda2eee0e1808b2b3a77afde3062e2cb9a24597 commit r12-5520-g4eda2eee0e1808b2b3a77afde3062e2cb9a24597 Author: Richard Biener 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 * 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); } }