Get rid of the emitted rustc_query_names and rustc_cached_queries macro

We can avoid these by adding slightly more information to `rustc_query_append` instead.
This commit is contained in:
Joshua Nelson 2022-09-06 21:26:02 -05:00
parent c630c87ceb
commit 3a4e3c7788
4 changed files with 38 additions and 40 deletions

View file

@ -307,18 +307,18 @@ pub fn alloc_self_profile_query_strings(tcx: TyCtxt<'_>) {
macro_rules! alloc_once {
(
$( $( #[$attr:meta] )* $name:ident, )+
) => {
$({
$($(#[$attr:meta])*
[$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty,)*) => {
$(
alloc_self_profile_query_strings_for_query_cache(
tcx,
stringify!($name),
&tcx.query_caches.$name,
&mut string_cache,
);
})+
)+
}
}
rustc_query_names! { alloc_once! }
rustc_query_append! { alloc_once! }
}