diff mbox series

[02/10] libcc1: use "override"

Message ID 20210103182631.2316205-3-tom@tromey.com
State New
Headers show
Series C++11-based improvements for libcc1 | expand

Commit Message

Tom Tromey Jan. 3, 2021, 6:26 p.m. UTC
This changes libcc1 to use "override" where appropriate.

libcc1/ChangeLog
2021-01-03  Tom Tromey  <tom@tromey.com>

	* 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/ChangeLog | 9 +++++++++
 libcc1/libcc1.cc | 6 +++---
 libcc1/libcp1.cc | 6 +++---
 3 files changed, 15 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libcc1/libcc1.cc b/libcc1/libcc1.cc
index 1838f2e5577..4fb3084c24c 100644
--- a/libcc1/libcc1.cc
+++ b/libcc1/libcc1.cc
@@ -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);
   }
diff --git a/libcc1/libcp1.cc b/libcc1/libcp1.cc
index e8aceb14604..5fa6a6742f5 100644
--- a/libcc1/libcp1.cc
+++ b/libcc1/libcp1.cc
@@ -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);
   }