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>
This commit is contained in:
Pierre-Emmanuel Patry 2023-07-26 17:00:57 +02:00 committed by Arthur Cohen
parent c0763eac05
commit ce09474789
2 changed files with 9 additions and 0 deletions

View File

@ -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 ()
{

View File

@ -102,6 +102,9 @@ struct ProcmacroArray
bool
not_available ();
extern "C" bool
bridge_is_available ();
} // namespace ProcMacro
#endif /* ! PROC_MACRO_H */