Skip to content

Commit 4a755f5

Browse files
authored
Merge pull request #4805 from YosysHQ/hash_scopeindex
add hash method to scopeindex cursor
2 parents b66897e + 2a744b4 commit 4a755f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/scopeinfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ class IdTree
169169
return !(*this == other);
170170
}
171171

172+
int hash() const {
173+
return mkhash(scope_name.hash(), hash_ptr_ops::hash(target));
174+
}
175+
172176
bool valid() const {
173177
return target != nullptr;
174178
}

0 commit comments

Comments
 (0)