public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Arthur Cohen <cohenarthur@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-7795] gccrs: Move some Gcc_backend method definitions out of class declaration
Date: Tue, 16 Jan 2024 17:59:12 +0000 (GMT)	[thread overview]
Message-ID: <20240116175912.5FA8B3858C2F@sourceware.org> (raw)

https://gcc.gnu.org/g:ad14f866184f91afa9a0a6e73ee14b06ce017037

commit r14-7795-gad14f866184f91afa9a0a6e73ee14b06ce017037
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date:   Fri Jul 14 15:27:54 2023 -0400

    gccrs: 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>

Diff:
---
 gcc/rust/rust-gcc.cc | 42 ++++++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index 1f5c9497d21..8a2071d7e26 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

                 reply	other threads:[~2024-01-16 17:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240116175912.5FA8B3858C2F@sourceware.org \
    --to=cohenarthur@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).