libcc1: use "override"
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 use "override" where appropriate.

libcc1

* libcp1.cc (class compiler_triplet_regexp)
(class compiler_driver_filename, class libcp1_connection): Use
"override".
* libcc1.cc (class compiler_triplet_regexp)
(class compiler_driver_filename, class libcc1_connection): Use
"override".

libcc1/libcc1.cc
libcc1/libcp1.cc

index 68d366a..2c08dab 100644 (file)
@@ -93,7 +93,7 @@ struct libcc1 : public gcc_c_context
   private:
     std::string triplet_regexp_;
   public:
-    virtual char *find (std::string &compiler) const;
+    char *find (std::string &compiler) const override;
     compiler_triplet_regexp (libcc1 *self, std::string triplet_regexp)
       : compiler (self), triplet_regexp_ (triplet_regexp)
     {
@@ -109,7 +109,7 @@ struct libcc1 : public gcc_c_context
   private:
     std::string driver_filename_;
   public:
-    virtual char *find (std::string &compiler) const;
+    char *find (std::string &compiler) const override;
     compiler_driver_filename (libcc1 *self, std::string driver_filename)
       : compiler (self), driver_filename_ (driver_filename)
     {
@@ -132,7 +132,7 @@ public:
   {
   }
 
-  virtual void print (const char *buf)
+  void print (const char *buf) override
   {
     back_ptr->print (buf);
   }
index 34d8957..fb91125 100644 (file)
@@ -94,7 +94,7 @@ struct libcp1 : public gcc_cp_context
   private:
     std::string triplet_regexp_;
   public:
-    virtual char *find (std::string &compiler) const;
+    char *find (std::string &compiler) const override;
     compiler_triplet_regexp (libcp1 *self, std::string triplet_regexp)
       : compiler (self), triplet_regexp_ (triplet_regexp)
     {
@@ -110,7 +110,7 @@ struct libcp1 : public gcc_cp_context
   private:
     std::string driver_filename_;
   public:
-    virtual char *find (std::string &compiler) const;
+    char *find (std::string &compiler) const override;
     compiler_driver_filename (libcp1 *self, std::string driver_filename)
       : compiler (self), driver_filename_ (driver_filename)
     {
@@ -133,7 +133,7 @@ public:
   {
   }
 
-  virtual void print (const char *buf)
+  void print (const char *buf) override
   {
     back_ptr->print (buf);
   }