]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Move some Gcc_backend method definitions out of class declaration
authorOwen Avery <powerboat9.gamer@gmail.com>
Fri, 14 Jul 2023 19:27:54 +0000 (15:27 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:55:56 +0000 (18:55 +0100)
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>
gcc/rust/rust-gcc.cc

index 1f5c9497d21f76fbad33577fa8004f98f9997691..8a2071d7e263edb88c15bb606b2f14beb5abbf90 100644 (file)
@@ -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