diff options
author | ReinUsesLisp <[email protected]> | 2019-09-09 16:46:46 -0300 |
---|---|---|
committer | ReinUsesLisp <[email protected]> | 2019-09-09 16:46:46 -0300 |
commit | bb6a3421d27b19d8caa203cca96f47210a670070 (patch) | |
tree | bba687f20549211f65f52e17fc25fbf841c07e4d /src/sirit.cpp | |
parent | ae7c664016471c08ba8fec252e0cab75db817286 (diff) | |
download | sirit-bb6a3421d27b19d8caa203cca96f47210a670070.tar.gz sirit-bb6a3421d27b19d8caa203cca96f47210a670070.zip |
Fix declarations hashing
Diffstat (limited to 'src/sirit.cpp')
-rw-r--r-- | src/sirit.cpp | 9 |
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; |