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:
Justin Bogner
2014-04-19 18:36:45 +00:00
parent 0043652979
commit c7070b0ac2
2 changed files with 9 additions and 3 deletions

View File

@@ -199,12 +199,14 @@ public:
using internal_key_type = StringRef;
using external_key_type = Identifier;
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) {
return ID.str();
}
uint32_t ComputeHash(internal_key_type key) {
hash_value_type ComputeHash(internal_key_type key) {
return llvm::HashString(key);
}
@@ -376,6 +378,8 @@ public:
using internal_key_type = StringRef;
using external_key_type = StringRef;
using data_type = BriefAndRawComment;
using hash_value_type = uint32_t;
using offset_type = unsigned;
DeclCommentTableInfo(ModuleFile &F) : F(F) {}
@@ -383,7 +387,7 @@ public:
return key;
}
uint32_t ComputeHash(internal_key_type key) {
hash_value_type ComputeHash(internal_key_type key) {
assert(!key.empty());
return llvm::HashString(key);
}