diff --git a/gcc/rust/expand/rust-proc-macro.cc b/gcc/rust/expand/rust-proc-macro.cc index acd7f711a28..7843ead4412 100644 --- a/gcc/rust/expand/rust-proc-macro.cc +++ b/gcc/rust/expand/rust-proc-macro.cc @@ -26,7 +26,7 @@ namespace Rust { const std::string PROC_MACRO_DECL_PREFIX = "__gccrs_proc_macro_decls_"; -ProcMacro::TokenStream +static ProcMacro::TokenStream tokenstream_from_string (std::string &data, bool &lex_error) { // FIXME: Insert location pointing to call site in tokens @@ -92,7 +92,7 @@ load_macros_array (std::string path) return nullptr; } - if (!REGISTER_CALLBACK (handle, __gccrs_pm_callback_from_str_fn, + if (!REGISTER_CALLBACK (handle, __gccrs_proc_macro_from_str_fn, tokenstream_from_string)) return nullptr; diff --git a/libgrust/libproc_macro/proc_macro.cc b/libgrust/libproc_macro/proc_macro.cc index effe7178b89..a4046919721 100644 --- a/libgrust/libproc_macro/proc_macro.cc +++ b/libgrust/libproc_macro/proc_macro.cc @@ -51,4 +51,4 @@ Procmacro::make_bang (const char *name, BangMacro macro) } // namespace ProcMacro -ProcMacro::from_str_function_t __gccrs_pm_callback_from_str_fn = nullptr; +ProcMacro::from_str_function_t __gccrs_proc_macro_from_str_fn = nullptr; diff --git a/libgrust/libproc_macro/registration.h b/libgrust/libproc_macro/registration.h index bba69b1e9bc..5cefc37de11 100644 --- a/libgrust/libproc_macro/registration.h +++ b/libgrust/libproc_macro/registration.h @@ -32,6 +32,6 @@ using from_str_function_t = ProcMacro::TokenStream (*) (std::string &, bool &); } // namespace ProcMacro -extern "C" ProcMacro::from_str_function_t __gccrs_pm_callback_from_str_fn; +extern "C" ProcMacro::from_str_function_t __gccrs_proc_macro_from_str_fn; #endif /* !REGISTRATION_H */ diff --git a/libgrust/libproc_macro/tokenstream.cc b/libgrust/libproc_macro/tokenstream.cc index 5d9abb69a2d..0f7f1f2079b 100644 --- a/libgrust/libproc_macro/tokenstream.cc +++ b/libgrust/libproc_macro/tokenstream.cc @@ -49,7 +49,7 @@ TokenStream::make_tokenstream (std::uint64_t capacity) TokenStream TokenStream::make_tokenstream (std::string &source, bool &has_error) { - return __gccrs_pm_callback_from_str_fn (source, has_error); + return __gccrs_proc_macro_from_str_fn (source, has_error); } void