[compiler] Prevent extra copies of pair
This fixes the following compiler warning: ``` src/compiler/backend/register-allocator-verifier.cc:365:19: warning: loop variable 'pair' of type 'const std::__1::pair<const v8::internal::compiler::InstructionOperand, v8::internal::compiler::Assessment *>' creates a copy from type 'const std::__1::pair<const v8::internal::compiler::InstructionOperand, v8::internal::compiler::Assessment *>' [-Wrange-loop-analysis] for (const auto pair : map()) { ^ src/compiler/backend/register-allocator-verifier.cc:365:8: note: use reference type 'const std::__1::pair<const v8::internal::compiler::InstructionOperand, v8::internal::compiler::Assessment *> &' to prevent copying for (const auto pair : map()) { ^~~~~~~~~~~~~~~~~ & ``` Signed-off-by: Darshan Sen <raisinten@gmail.com> Change-Id: Ifbaa85345d8dcdf56a68d194bba98d76878c96f3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538286Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#79555}
Showing
Please
register
or
sign in
to comment