]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Move debug-related functions into base class Backend
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 31 Aug 2023 15:25:47 +0000 (11:25 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:31 +0000 (19:04 +0100)
gcc/rust/ChangeLog:

* rust-backend.h
(Backend::debug): Make non-virtual.
(Backend::get_identifier_node): Likewise.

(Gcc_backend::debug): Remove.
(Gcc_backend::get_identifier_node): Remove.
* rust-gcc.cc
(Gcc_backend::debug): Rename to ...
(Backend::debug): ... here.
(Gcc_backend::get_identifier_node): Rename to ...
(Backend::get_identifier_node): ... here.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/rust-backend.h
gcc/rust/rust-gcc.cc

index 21a913757d7c89d5b14bcd8ba93cd7db1a838a78..cb091b114bcdb95743a19c2b5a2a340cdd3894ff 100644 (file)
@@ -63,10 +63,10 @@ public:
   };
 
   // debug
-  virtual void debug (tree) = 0;
-  virtual void debug (Bvariable *) = 0;
+  void debug (tree);
+  void debug (Bvariable *);
 
-  virtual tree get_identifier_node (const std::string &str) = 0;
+  tree get_identifier_node (const std::string &str);
 
   // Types.
 
@@ -503,11 +503,6 @@ class Gcc_backend : public Backend
 public:
   Gcc_backend ();
 
-  void debug (tree t);
-  void debug (Bvariable *t);
-
-  tree get_identifier_node (const std::string &str);
-
   // Expressions.
 
   tree zero_expression (tree);
index c3db37f288a1b2a342b6c96c09e882ee944b393c..5ed73066beaf164c87f6cea82c326b0265e42434 100644 (file)
@@ -322,19 +322,19 @@ Gcc_backend::Gcc_backend ()
 }
 
 void
-Gcc_backend::debug (tree t)
+Backend::debug (tree t)
 {
   debug_tree (t);
 };
 
 void
-Gcc_backend::debug (Bvariable *t)
+Backend::debug (Bvariable *t)
 {
   debug_tree (t->get_decl ());
 };
 
 tree
-Gcc_backend::get_identifier_node (const std::string &str)
+Backend::get_identifier_node (const std::string &str)
 {
   return get_identifier_with_length (str.data (), str.length ());
 }