The symbol had a different convention from rust standard naming
convention (?) hence the change before adding new callback.
gcc/rust/ChangeLog:
* expand/rust-proc-macro.cc (load_macros_array): Symbol rename.
libgrust/ChangeLog:
* libproc_macro/proc_macro.cc (Procmacro::make_bang):
Change symbol name.
* libproc_macro/registration.h: Likewise.
* libproc_macro/tokenstream.cc (TokenStream::make_tokenstream): Likewise.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
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
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;
} // 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;
} // 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 */
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