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-7845] gccrs: proc_macro: Add is_available function
Date: Tue, 16 Jan 2024 18:03:30 +0000 (GMT)	[thread overview]
Message-ID: <20240116180330.CCE6B3858009@sourceware.org> (raw)

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

commit r14-7845-gce09474789d6e6df1b2b921df84c27db80fe02ba
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed Jul 26 17:00:57 2023 +0200

    gccrs: proc_macro: Add is_available function
    
    Add is_available function to the C++ library.
    
    libgrust/ChangeLog:
    
            * libproc_macro/proc_macro.cc (bridge_is_available):
            Add bridge function.
            * libproc_macro/proc_macro.h (bridge_is_available):
            Likewise.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 libgrust/libproc_macro/proc_macro.cc | 6 ++++++
 libgrust/libproc_macro/proc_macro.h  | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/libgrust/libproc_macro/proc_macro.cc b/libgrust/libproc_macro/proc_macro.cc
index 1e9e3fdfaed..e05ec5300b7 100644
--- a/libgrust/libproc_macro/proc_macro.cc
+++ b/libgrust/libproc_macro/proc_macro.cc
@@ -49,6 +49,12 @@ Procmacro::make_bang (const char *name, BangMacro macro)
   return {BANG, payload};
 }
 
+extern "C" bool
+bridge_is_available ()
+{
+  return __gccrs_proc_macro_is_available_fn ();
+}
+
 bool
 not_available ()
 {
diff --git a/libgrust/libproc_macro/proc_macro.h b/libgrust/libproc_macro/proc_macro.h
index 0b3ec3c4d55..077e1cbbb48 100644
--- a/libgrust/libproc_macro/proc_macro.h
+++ b/libgrust/libproc_macro/proc_macro.h
@@ -102,6 +102,9 @@ struct ProcmacroArray
 bool
 not_available ();
 
+extern "C" bool
+bridge_is_available ();
+
 } // namespace ProcMacro
 
 #endif /* ! PROC_MACRO_H */

                 reply	other threads:[~2024-01-16 18:03 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=20240116180330.CCE6B3858009@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).