From patchwork Wed Apr 28 01:01:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 1470929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=e2q2jCc9; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FVL1z1nwRz9sWc for ; Wed, 28 Apr 2021 11:01:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E58A239BD03E; Wed, 28 Apr 2021 01:01:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from gateway22.websitewelcome.com (gateway22.websitewelcome.com [192.185.47.129]) by sourceware.org (Postfix) with ESMTPS id 300013854813 for ; Wed, 28 Apr 2021 01:01:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 300013854813 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway22.websitewelcome.com (Postfix) with ESMTP id CCC9F7DC89 for ; Tue, 27 Apr 2021 20:01:39 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id bYaBlCxBU1cHebYaBlFDZ6; Tue, 27 Apr 2021 20:01:39 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=D3DIvFbsOQwblHccUzOr7nnQr4CAslYsr53Po7Doz/o=; b=e2q2jCc9mSVqY7G29zxyi3/Uba RFW6WdgGn9bmQMM++0BZCCEm411FAtc8+DLPU1PIgkeC9KKv0HfRBjLzaESNZWVMyWCmNz2ByV99a UopwGU47wkDNqPkW121Ja+X7c; Received: from 97-122-70-176.hlrn.qwest.net ([97.122.70.176]:32966 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lbYaB-003tiR-Cn; Tue, 27 Apr 2021 19:01:39 -0600 From: Tom Tromey To: gcc-patches@gcc.gnu.org Subject: [PATCH v2 03/21] libcc1: inline some simple methods Date: Tue, 27 Apr 2021 19:01:01 -0600 Message-Id: <20210428010119.806184-4-tom@tromey.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210428010119.806184-1-tom@tromey.com> References: <20210428010119.806184-1-tom@tromey.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.70.176 X-Source-L: No X-Exim-ID: 1lbYaB-003tiR-Cn X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-70-176.hlrn.qwest.net (localhost.localdomain) [97.122.70.176]:32966 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3031.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , Cc: Tom Tromey Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This changes libcc1 to inline a trivial method and to use the default constructor. libcc1/ChangeLog 2021-04-27 Tom Tromey * connection.hh (~connection): Use default. (print): Inline. * connection.cc (cc1_plugin::connection::~connection) (cc1_plugin::connection::print): Remove definitions. --- libcc1/ChangeLog | 7 +++++++ libcc1/connection.cc | 9 --------- libcc1/connection.hh | 6 ++++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libcc1/connection.cc b/libcc1/connection.cc index 64a6d4922c15..66d573911080 100644 --- a/libcc1/connection.cc +++ b/libcc1/connection.cc @@ -27,15 +27,6 @@ along with GCC; see the file COPYING3. If not see #include "connection.hh" #include "rpc.hh" -cc1_plugin::connection::~connection () -{ -} - -void -cc1_plugin::connection::print (const char *) -{ -} - cc1_plugin::status cc1_plugin::connection::send (char c) { diff --git a/libcc1/connection.hh b/libcc1/connection.hh index 50e8a8b5a032..a0e99bdbd98f 100644 --- a/libcc1/connection.hh +++ b/libcc1/connection.hh @@ -46,7 +46,7 @@ namespace cc1_plugin { } - virtual ~connection (); + virtual ~connection () = default; // Send a single character. This is used to introduce various // higher-level protocol elements. @@ -89,7 +89,9 @@ namespace cc1_plugin m_callbacks.add_callback (name, func); } - virtual void print (const char *); + virtual void print (const char *) + { + } private: