]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libcc1: inline some simple methods
authorTom Tromey <tom@tromey.com>
Tue, 4 May 2021 21:26:58 +0000 (15:26 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 5 May 2021 06:06:16 +0000 (00:06 -0600)
This changes libcc1 to inline a trivial method and to use the default
constructor.

libcc1

* connection.hh (~connection): Use default.
(print): Inline.
* connection.cc (cc1_plugin::connection::~connection)
(cc1_plugin::connection::print): Remove definitions.

libcc1/connection.cc
libcc1/connection.hh

index 64a6d4922c15000812be203c4d574ff1d8130a36..66d573911080cfdd25b844ce62d9caa876236f32 100644 (file)
@@ -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)
 {
index 50e8a8b5a032807cc461f17130a7e6355c55de5c..a0e99bdbd98fd7c9f067d5f54dd40b2f8cfbc0a0 100644 (file)
@@ -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: