aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/emit_glasm.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-07-12 05:22:01 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:40 -0400
commitbf2956d77ab0ad06c4b5505cc9906e51e5878274 (patch)
tree3aae336c0dc3fe65351d5e6e312a214351e2e2fc /src/shader_recompiler/backend/glasm/emit_glasm.cpp
parent94af0a00f67c9f28fcaf170458e55b7a95de76bf (diff)
shader: Avoid usage of C++20 ranges to build in clang
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index 64787b3537..a5e8c9b6e0 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include <ranges>
+#include <algorithm>
#include <string>
#include <tuple>
@@ -196,7 +196,10 @@ void PrecolorInst(IR::Inst& phi) {
void Precolor(const IR::Program& program) {
for (IR::Block* const block : program.blocks) {
- for (IR::Inst& phi : block->Instructions() | std::views::take_while(IR::IsPhi)) {
+ for (IR::Inst& phi : block->Instructions()) {
+ if (!IR::IsPhi(phi)) {
+ break;
+ }
PrecolorInst(phi);
}
}