public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7845] gccrs: proc_macro: Add is_available function
@ 2024-01-16 18:03 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:03 UTC (permalink / raw)
  To: gcc-cvs

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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 18:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:03 [gcc r14-7845] gccrs: proc_macro: Add is_available function Arthur Cohen

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).