mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
clover/util: add id_type_equals to support symbols with multiple sections
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6569>
This commit is contained in:
parent
7fb4ab9ec1
commit
af85985250
1 changed files with 24 additions and 0 deletions
|
|
@ -406,6 +406,30 @@ namespace clover {
|
|||
return { x };
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class id_type_equals_t {
|
||||
public:
|
||||
id_type_equals_t(const uint32_t id, T t) :
|
||||
id(id), type(t) {
|
||||
}
|
||||
|
||||
template<typename X>
|
||||
bool
|
||||
operator()(const X &x) const {
|
||||
return id == x.id && type(x);
|
||||
}
|
||||
|
||||
private:
|
||||
const uint32_t id;
|
||||
type_equals_t<T> type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
id_type_equals_t<T>
|
||||
id_type_equals(const uint32_t id, T x) {
|
||||
return { id, x };
|
||||
}
|
||||
|
||||
struct interval_overlaps {
|
||||
template<typename T>
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue