aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-gcc.cc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-14 15:27:54 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-07-17 09:40:41 +0000
commitb7c8f5a33bace9186a151cb6281e15afae176b94 (patch)
tree387ccdc2309456ed15bc561db17cc8fad5c1bea7 /gcc/rust/rust-gcc.cc
parentd7651385b69495089ccb37cb0c76be12aeeec7e7 (diff)
downloadgcc-b7c8f5a33bace9186a151cb6281e15afae176b94.zip
gcc-b7c8f5a33bace9186a151cb6281e15afae176b94.tar.gz
gcc-b7c8f5a33bace9186a151cb6281e15afae176b94.tar.bz2
Move some Gcc_backend method definitions out of class declaration
gcc/rust/ChangeLog: * rust-gcc.cc (Gcc_backend::debug): Move out of class declaration. (Gcc_backend::get_identifier_node): Likewise. (Gcc_backend::wchar_type): Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r--gcc/rust/rust-gcc.cc42
1 files changed, 30 insertions, 12 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index b1f4901..0c6af10 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -88,13 +88,10 @@ class Gcc_backend : public Backend
public:
Gcc_backend ();
- void debug (tree t) { debug_tree (t); };
- void debug (Bvariable *t) { debug_tree (t->get_decl ()); };
+ void debug (tree t);
+ void debug (Bvariable *t);
- tree get_identifier_node (const std::string &str)
- {
- return get_identifier_with_length (str.data (), str.length ());
- }
+ tree get_identifier_node (const std::string &str);
// Types.
@@ -102,12 +99,7 @@ public:
tree char_type () { return char_type_node; }
- tree wchar_type ()
- {
- tree wchar = make_unsigned_type (32);
- TYPE_STRING_FLAG (wchar) = 1;
- return wchar;
- }
+ tree wchar_type ();
int get_pointer_size ();
@@ -534,6 +526,32 @@ Gcc_backend::Gcc_backend ()
// t, 0);
}
+void
+Gcc_backend::debug (tree t)
+{
+ debug_tree (t);
+};
+
+void
+Gcc_backend::debug (Bvariable *t)
+{
+ debug_tree (t->get_decl ());
+};
+
+tree
+Gcc_backend::get_identifier_node (const std::string &str)
+{
+ return get_identifier_with_length (str.data (), str.length ());
+}
+
+tree
+Gcc_backend::wchar_type ()
+{
+ tree wchar = make_unsigned_type (32);
+ TYPE_STRING_FLAG (wchar) = 1;
+ return wchar;
+}
+
// Get an unnamed integer type.
int