tint/resolver: Pass std::function by ref

Avoids a copy

Change-Id: Ief4e7985b41c50f102be27a8a3fa9a690166511f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116868
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton 2023-02-14 18:09:17 +00:00 committed by Dawn LUCI CQ
parent ee665a4240
commit 727503d205
1 changed files with 2 additions and 2 deletions

View File

@ -1143,7 +1143,7 @@ class Impl : public IntrinsicTable {
utils::VectorRef<const type::Type*> args, utils::VectorRef<const type::Type*> args,
sem::EvaluationStage earliest_eval_stage, sem::EvaluationStage earliest_eval_stage,
TemplateState templates, TemplateState templates,
OnNoMatch on_no_match) const; const OnNoMatch& on_no_match) const;
/// Evaluates the single overload for the provided argument types. /// Evaluates the single overload for the provided argument types.
/// @param overload the overload being considered /// @param overload the overload being considered
@ -1505,7 +1505,7 @@ IntrinsicPrototype Impl::MatchIntrinsic(const IntrinsicInfo& intrinsic,
utils::VectorRef<const type::Type*> args, utils::VectorRef<const type::Type*> args,
sem::EvaluationStage earliest_eval_stage, sem::EvaluationStage earliest_eval_stage,
TemplateState templates, TemplateState templates,
OnNoMatch on_no_match) const { const OnNoMatch& on_no_match) const {
size_t num_matched = 0; size_t num_matched = 0;
size_t match_idx = 0; size_t match_idx = 0;
utils::Vector<Candidate, kNumFixedCandidates> candidates; utils::Vector<Candidate, kNumFixedCandidates> candidates;