Skip to content

Commit

Permalink
Remove Q parameter from alloc_self_profile_query_strings_for_query_ca…
Browse files Browse the repository at this point in the history
…che.
  • Loading branch information
cjgillot committed Mar 16, 2020
1 parent fa02dca commit a18aa81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/librustc/ty/query/plumbing.rs
Expand Up @@ -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,
Expand Down
11 changes: 6 additions & 5 deletions src/librustc/ty/query/profiling_support.rs
@@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a18aa81

Please sign in to comment.