mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Teach more users of OnDiskHashTable to define hash_value and offset types
I'd missed a few of these on the first pass. This should get the builds going again. Swift SVN r16570
This commit is contained in:
@@ -57,12 +57,14 @@ public:
|
|||||||
using internal_key_type = StringRef;
|
using internal_key_type = StringRef;
|
||||||
using external_key_type = StringRef;
|
using external_key_type = StringRef;
|
||||||
using data_type = DeclID;
|
using data_type = DeclID;
|
||||||
|
using hash_value_type = uint32_t;
|
||||||
|
using offset_type = unsigned;
|
||||||
|
|
||||||
internal_key_type GetInternalKey(external_key_type ID) { return ID; }
|
internal_key_type GetInternalKey(external_key_type ID) { return ID; }
|
||||||
|
|
||||||
external_key_type GetExternalKey(internal_key_type ID) { return ID; }
|
external_key_type GetExternalKey(internal_key_type ID) { return ID; }
|
||||||
|
|
||||||
uint32_t ComputeHash(internal_key_type key) {
|
hash_value_type ComputeHash(internal_key_type key) {
|
||||||
return llvm::HashString(key);
|
return llvm::HashString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,12 +199,14 @@ public:
|
|||||||
using internal_key_type = StringRef;
|
using internal_key_type = StringRef;
|
||||||
using external_key_type = Identifier;
|
using external_key_type = Identifier;
|
||||||
using data_type = SmallVector<std::pair<uint8_t, DeclID>, 8>;
|
using data_type = SmallVector<std::pair<uint8_t, DeclID>, 8>;
|
||||||
|
using hash_value_type = uint32_t;
|
||||||
|
using offset_type = unsigned;
|
||||||
|
|
||||||
internal_key_type GetInternalKey(external_key_type ID) {
|
internal_key_type GetInternalKey(external_key_type ID) {
|
||||||
return ID.str();
|
return ID.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t ComputeHash(internal_key_type key) {
|
hash_value_type ComputeHash(internal_key_type key) {
|
||||||
return llvm::HashString(key);
|
return llvm::HashString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,6 +378,8 @@ public:
|
|||||||
using internal_key_type = StringRef;
|
using internal_key_type = StringRef;
|
||||||
using external_key_type = StringRef;
|
using external_key_type = StringRef;
|
||||||
using data_type = BriefAndRawComment;
|
using data_type = BriefAndRawComment;
|
||||||
|
using hash_value_type = uint32_t;
|
||||||
|
using offset_type = unsigned;
|
||||||
|
|
||||||
DeclCommentTableInfo(ModuleFile &F) : F(F) {}
|
DeclCommentTableInfo(ModuleFile &F) : F(F) {}
|
||||||
|
|
||||||
@@ -383,7 +387,7 @@ public:
|
|||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t ComputeHash(internal_key_type key) {
|
hash_value_type ComputeHash(internal_key_type key) {
|
||||||
assert(!key.empty());
|
assert(!key.empty());
|
||||||
return llvm::HashString(key);
|
return llvm::HashString(key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user