summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-07-12 05:22:01 -0300
committerGravatar ameerj2021-07-22 21:51:40 -0400
commitbf2956d77ab0ad06c4b5505cc9906e51e5878274 (patch)
tree3aae336c0dc3fe65351d5e6e312a214351e2e2fc /src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
parentglsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE (diff)
downloadyuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.gz
yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.xz
yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.zip
shader: Avoid usage of C++20 ranges to build in clang
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index 221454b99..8b3e0a15c 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -4,7 +4,6 @@
4 4
5#include <algorithm> 5#include <algorithm>
6#include <memory> 6#include <memory>
7#include <ranges>
8#include <string> 7#include <string>
9#include <unordered_map> 8#include <unordered_map>
10#include <utility> 9#include <utility>
@@ -167,7 +166,7 @@ std::string DumpExpr(const Statement* stmt) {
167 } 166 }
168} 167}
169 168
170std::string DumpTree(const Tree& tree, u32 indentation = 0) { 169[[maybe_unused]] std::string DumpTree(const Tree& tree, u32 indentation = 0) {
171 std::string ret; 170 std::string ret;
172 std::string indent(indentation, ' '); 171 std::string indent(indentation, ' ');
173 for (auto stmt = tree.begin(); stmt != tree.end(); ++stmt) { 172 for (auto stmt = tree.begin(); stmt != tree.end(); ++stmt) {
@@ -315,8 +314,9 @@ class GotoPass {
315public: 314public:
316 explicit GotoPass(Flow::CFG& cfg, ObjectPool<Statement>& stmt_pool) : pool{stmt_pool} { 315 explicit GotoPass(Flow::CFG& cfg, ObjectPool<Statement>& stmt_pool) : pool{stmt_pool} {
317 std::vector gotos{BuildTree(cfg)}; 316 std::vector gotos{BuildTree(cfg)};
318 for (const Node& goto_stmt : gotos | std::views::reverse) { 317 const auto end{gotos.rend()};
319 RemoveGoto(goto_stmt); 318 for (auto goto_stmt = gotos.rbegin(); goto_stmt != end; ++goto_stmt) {
319 RemoveGoto(*goto_stmt);
320 } 320 }
321 } 321 }
322 322