[Serialization] The hash seed for DeclCommentTableInfo can't change

Unlike compiled modules, swiftdoc files are considered a stable
format, so we can't change how information is stored in them. If we
add any more string-hashed tables to swiftdoc files, we should
consider using a new hash seed for those.
This commit is contained in:
Jordan Rose
2019-08-19 19:46:51 -07:00
parent 11e206af7a
commit b0ad06ae30
3 changed files with 11 additions and 4 deletions

View File

@@ -972,8 +972,7 @@ public:
hash_value_type ComputeHash(internal_key_type key) {
assert(!key.empty());
// FIXME: DJB seed=0, audit whether the default seed could be used.
return llvm::djbHash(key, 0);
return llvm::djbHash(key, SWIFTDOC_HASH_SEED_5_1);
}
static bool EqualKey(internal_key_type lhs, internal_key_type rhs) {