]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Remove Gcc_backend
authorOwen Avery <powerboat9.gamer@gmail.com>
Mon, 4 Sep 2023 18:09:10 +0000 (14:09 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:35 +0000 (19:04 +0100)
gcc/rust/ChangeLog:

* rust-backend.h
(Backend::Backend): New.
(Backend::~Backend): Remove.
(class Gcc_backend): Remove.
* rust-gcc.cc
(Gcc_backend::Gcc_backend): Rename to ...
(Backend::Backend): ... here.
(rust_get_backend): Construct Backend instead of Gcc_backend.

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

index ceb5f9f045e3f27458bab2d086b4f4aa138f34c2..1e2f7c155361632c3d111b711a008768e1e16816 100644 (file)
@@ -43,7 +43,7 @@ class Bvariable;
 class Backend
 {
 public:
-  virtual ~Backend () {}
+  Backend ();
 
   // Name/type/location.  Used for function parameters, struct fields,
   // interface methods.
@@ -466,10 +466,4 @@ protected:
   tree convert_tree (tree, tree, location_t);
 };
 
-class Gcc_backend : public Backend
-{
-public:
-  Gcc_backend ();
-};
-
 #endif // RUST_BACKEND_H
index 3de0887355078289f3cdcb4c19f15e4fe27ad276..083add4bcaee3533fbaa05872acd7725659e36e4 100644 (file)
@@ -99,7 +99,7 @@ get_identifier_from_string (const std::string &str)
 
 // Define the built-in functions that are exposed to GCCRust.
 
-Gcc_backend::Gcc_backend ()
+Backend::Backend ()
 {
   /* We need to define the fetch_and_add functions, since we use them
      for ++ and --.  */
@@ -2474,5 +2474,5 @@ Backend::write_global_definitions (
 Backend *
 rust_get_backend ()
 {
-  return new Gcc_backend ();
+  return new Backend ();
 }