mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
think this user iterator will work
This commit is contained in:
parent
e96afcd1cb
commit
3c6d335be4
@ -11,6 +11,8 @@
|
|||||||
#include <boost/container/list.hpp>
|
#include <boost/container/list.hpp>
|
||||||
#include <boost/container/small_vector.hpp>
|
#include <boost/container/small_vector.hpp>
|
||||||
#include <boost/intrusive/list.hpp>
|
#include <boost/intrusive/list.hpp>
|
||||||
|
#include <boost/range/adaptors.hpp>
|
||||||
|
#include <boost/range/algorithm/unique.hpp>
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "shader_recompiler/exception.h"
|
#include "shader_recompiler/exception.h"
|
||||||
@ -211,6 +213,21 @@ public:
|
|||||||
return std::bit_cast<DefinitionType>(definition);
|
return std::bit_cast<DefinitionType>(definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto users() {
|
||||||
|
return boost::adaptors::transform(
|
||||||
|
boost::unique(uses,
|
||||||
|
[](const IR::Use& a, const IR::Use& b) { return a.user == b.user; }),
|
||||||
|
[](const IR::Use& use) { return use.user; });
|
||||||
|
}
|
||||||
|
|
||||||
|
auto user_begin() {
|
||||||
|
return users().begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
auto user_end() {
|
||||||
|
return users().end();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct NonTriviallyDummy {
|
struct NonTriviallyDummy {
|
||||||
NonTriviallyDummy() noexcept {}
|
NonTriviallyDummy() noexcept {}
|
||||||
|
Loading…
Reference in New Issue
Block a user