mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 03:27:59 -05:00
shader: Avoid usage of C++20 ranges to build in clang
This commit is contained in:
@ -14,7 +14,6 @@
|
||||
// https://link.springer.com/chapter/10.1007/978-3-642-37051-9_6
|
||||
//
|
||||
|
||||
#include <ranges>
|
||||
#include <span>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
@ -243,7 +242,9 @@ public:
|
||||
void SealBlock(IR::Block* block) {
|
||||
const auto it{incomplete_phis.find(block)};
|
||||
if (it != incomplete_phis.end()) {
|
||||
for (auto& [variant, phi] : it->second) {
|
||||
for (auto& pair : it->second) {
|
||||
auto& variant{pair.first};
|
||||
auto& phi{pair.second};
|
||||
std::visit([&](auto& variable) { AddPhiOperands(variable, *phi, block); }, variant);
|
||||
}
|
||||
}
|
||||
@ -373,8 +374,9 @@ void VisitBlock(Pass& pass, IR::Block* block) {
|
||||
|
||||
void SsaRewritePass(IR::Program& program) {
|
||||
Pass pass;
|
||||
for (IR::Block* const block : program.post_order_blocks | std::views::reverse) {
|
||||
VisitBlock(pass, block);
|
||||
const auto end{program.post_order_blocks.rend()};
|
||||
for (auto block = program.post_order_blocks.rbegin(); block != end; ++block) {
|
||||
VisitBlock(pass, *block);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user