Skip to content

Commit

Permalink
Merge pull request #4805 from YosysHQ/hash_scopeindex
Browse files Browse the repository at this point in the history
add hash method to scopeindex cursor
  • Loading branch information
mmicko authored Dec 6, 2024
2 parents b66897e + 2a744b4 commit 4a755f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/scopeinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ class IdTree
return !(*this == other);
}

int hash() const {
return mkhash(scope_name.hash(), hash_ptr_ops::hash(target));
}

bool valid() const {
return target != nullptr;
}
Expand Down

0 comments on commit 4a755f5

Please sign in to comment.