aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-08-31 11:25:47 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:04:31 +0100
commitfe97255c29024535e8c49663a4abb8d419073ab1 (patch)
tree9d04dfb7b61078231553dcbdcba8a5b884ab6695
parent6e7ed4bad9656e8b5c5996396ed29ca5f06d3808 (diff)
downloadgcc-fe97255c29024535e8c49663a4abb8d419073ab1.zip
gcc-fe97255c29024535e8c49663a4abb8d419073ab1.tar.gz
gcc-fe97255c29024535e8c49663a4abb8d419073ab1.tar.bz2
gccrs: Move debug-related functions into base class Backend
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>
-rw-r--r--gcc/rust/rust-backend.h11
-rw-r--r--gcc/rust/rust-gcc.cc6
2 files changed, 6 insertions, 11 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index 21a9137..cb091b1 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -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);
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index c3db37f..5ed7306 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -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 ());
}