From patchwork Tue Sep 14 00:16:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Peterson X-Patchwork-Id: 44967 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83EF73858023 for ; Tue, 14 Sep 2021 00:16:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by sourceware.org (Postfix) with ESMTPS id 291043858402 for ; Tue, 14 Sep 2021 00:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 291043858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=locrian.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=locrian.net Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 6B996320090F for ; Mon, 13 Sep 2021 20:16:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 13 Sep 2021 20:16:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=locrian.net; h= from:to:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=6ZalGn2GamwgtSxdws22IBpk8S 8sjJa36gQIpu1Neo4=; b=hiIsHLiOli0kIeCHOVkex002F7jHabBG5EG/czIcB3 ILVU8BSoV7s1Y9C87AALTbKvASt/GZMdQww2fURw2us3PDduofCLGZxDYmaOwaQt 4v3ekYPPjfl8XCWHkgFdVrJz8L8nVROgZrXwLc1UPQr1j8e8uBR6hGD0Gkg/vWel TlQ5Tjl7VIY1Nek4vpdFiPyQ4NrnjhhZiYPz5NEay6ed5s7eWpncbrMOoFHT6DHM ze3RWk6Gp4uSdJuOKOykk4dHLsP1jDPRuSZIRpqG6gfuU1fRWoI/5NA/vF5Qs32c lEK4OetIyjUGMWMNYrKjBhFHnPKorXWPOLEl6TRNuVuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6ZalGn2GamwgtSxdw s22IBpk8S8sjJa36gQIpu1Neo4=; b=Nqhv9ciNU6jKVJZu7e8eTkocTe+2gudgD xXG/Gso8+DKGhbY65Y6kbUUr1HZy46paVOfVYWeuwXuCCBEbbvViYR6FT4P5FeYN ilH/x43c4miqWyP29XwxHhkHpA4tGKAF9jTjCpXHA6Hm+qvyF95W4ceYIh9LP1Kj zu2Jfr9bpQNL3ypdwkM5X6XJwbrE4OGhmXHCZk0FbCqVvQkB9M+5TvmXgMh7m/Bo 4YXSPjo6hB1H0nTQb5ELi/u6pb+c0N+w8i0v34UOFnjf7+xmhUFx8pBku9F6Bxdt FXUuoZrYtN+oiyWuvfw9iHuMiRsFQ1Leje+7rznn23cgWKsV0HQwA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegkedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepuegvnhhjrghmihhnucfrvghtvghrshhonhcuoegsvghnjhgrmhhi nheslhhotghrihgrnhdrnhgvtheqnecuggftrfgrthhtvghrnhephfehledvteduffduie eukedtueffgeethefhteduuedvgefgfeevgfekveeitedunecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsggvnhhjrghmihhnsehlohgtrhhirg hnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 13 Sep 2021 20:16:32 -0400 (EDT) From: Benjamin Peterson To: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove unused function make_unique_name. Date: Mon, 13 Sep 2021 17:16:30 -0700 Message-Id: <20210914001630.215185-1-benjamin@locrian.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Signed-off-by: Benjamin Peterson gcc/ * attribs.c (make_unique_name): Delete. * attribs.h (make_unique_name): Delete. --- gcc/attribs.c | 34 ---------------------------------- gcc/attribs.h | 1 - 2 files changed, 35 deletions(-) diff --git a/gcc/attribs.c b/gcc/attribs.c index 0d22c20a35e..83fafc98b7d 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 87231b954c6..138c509bce1 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);