aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2019-09-09 16:46:46 -0300
committerReinUsesLisp <[email protected]>2019-09-09 16:46:46 -0300
commitbb6a3421d27b19d8caa203cca96f47210a670070 (patch)
treebba687f20549211f65f52e17fc25fbf841c07e4d /src
parentae7c664016471c08ba8fec252e0cab75db817286 (diff)
downloadsirit-bb6a3421d27b19d8caa203cca96f47210a670070.tar.gz
sirit-bb6a3421d27b19d8caa203cca96f47210a670070.zip
Fix declarations hashing
Diffstat (limited to 'src')
-rw-r--r--src/sirit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sirit.cpp b/src/sirit.cpp
index 50135e3..f65e9a5 100644
--- a/src/sirit.cpp
+++ b/src/sirit.cpp
@@ -20,6 +20,15 @@ static void WriteSet(Stream& stream, const T& set) {
}
}
+std::size_t Module::HashOp::operator()(const std::unique_ptr<Op>& op) const noexcept {
+ return op->Hash();
+}
+
+bool Module::EqualOp::operator()(const std::unique_ptr<Op>& lhs,
+ const std::unique_ptr<Op>& rhs) const noexcept {
+ return *lhs == *rhs;
+}
+
Module::Module(u32 version) : version(version) {}
Module::~Module() = default;