aco: Use correct reference type in for-range-loop.
authorOschowa <oschowa@web.de>
Wed, 27 May 2020 10:00:19 +0000 (12:00 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 21:31:17 +0000 (21:31 +0000)
Fixes a clang warning.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>

src/amd/compiler/aco_lower_to_hw_instr.cpp

index 4383b1988903f5674f8500ff0458b22b457eed63..05790366a71de605f7940e3d3c78af0938247cb4 100644 (file)
@@ -1257,7 +1257,7 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
 
    /* all target regs are needed as operand somewhere which means, all entries are part of a cycle */
    unsigned largest = 0;
-   for (const std::pair<PhysReg, copy_operation>& op : copy_map)
+   for (const std::pair<const PhysReg, copy_operation>& op : copy_map)
       largest = MAX2(largest, op.second.bytes);
 
    while (!copy_map.empty()) {