mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user