Remove Q parameter from alloc_self_profile_query_strings_for_query_cache.

This commit is contained in:
Camille GILLOT 2020-03-06 20:17:03 +01:00
parent fa02dca428
commit a18aa81bd8
2 changed files with 7 additions and 6 deletions

View file

@ -1043,7 +1043,7 @@ macro_rules! define_queries_inner {
let mut string_cache = QueryKeyStringCache::new();
$({
alloc_self_profile_query_strings_for_query_cache::<queries::$name<'_>>(
alloc_self_profile_query_strings_for_query_cache(
self,
stringify!($name),
&self.queries.$name,

View file

@ -1,7 +1,7 @@
use crate::hir::map::definitions::DefPathData;
use crate::ty::context::TyCtxt;
use crate::ty::query::config::QueryAccessors;
use crate::ty::query::plumbing::QueryState;
use crate::ty::query::caches::QueryCache;
use crate::ty::query::plumbing::QueryStateImpl;
use measureme::{StringComponent, StringId};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::profiling::SelfProfiler;
@ -157,13 +157,14 @@ where
/// Allocate the self-profiling query strings for a single query cache. This
/// method is called from `alloc_self_profile_query_strings` which knows all
/// the queries via macro magic.
pub(super) fn alloc_self_profile_query_strings_for_query_cache<'tcx, Q>(
pub(super) fn alloc_self_profile_query_strings_for_query_cache<'tcx, K, V, C>(
tcx: TyCtxt<'tcx>,
query_name: &'static str,
query_state: &QueryState<'tcx, Q>,
query_state: &QueryStateImpl<'tcx, K, V, C>,
string_cache: &mut QueryKeyStringCache,
) where
Q: QueryAccessors<'tcx>,
K: Debug + Clone,
C: QueryCache<K, V>,
{
tcx.prof.with_profiler(|profiler| {
let event_id_builder = profiler.event_id_builder();