• Darshan Sen's avatar
    [compiler] Prevent extra copies of pair · 3c03e3fc
    Darshan Sen authored
    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: 's avatarDarshan Sen <raisinten@gmail.com>
    Change-Id: Ifbaa85345d8dcdf56a68d194bba98d76878c96f3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538286Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79555}
    3c03e3fc
register-allocator-verifier.cc 24.1 KB