aboutsummaryrefslogtreecommitdiffstats
path: root/common/idstringlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/idstringlist.h')
-rw-r--r--common/idstringlist.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/idstringlist.h b/common/idstringlist.h
index 24a46731..753b408c 100644
--- a/common/idstringlist.h
+++ b/common/idstringlist.h
@@ -22,6 +22,7 @@
#define IDSTRING_LIST_H
#include <boost/functional/hash.hpp>
+#include "hashlib.h"
#include "idstring.h"
#include "nextpnr_namespaces.h"
#include "sso_array.h"
@@ -67,6 +68,14 @@ struct IdStringList
static IdStringList concat(IdStringList a, IdStringList b);
IdStringList slice(size_t s, size_t e) const;
+
+ unsigned int hash() const
+ {
+ unsigned int h = mkhash_init;
+ for (const auto &val : ids)
+ h = mkhash(h, val.hash());
+ return h;
+ }
};
NEXTPNR_NAMESPACE_END