typedef PTHEntry data_type;
typedef const PTHEntry& data_type_ref;
- static unsigned ComputeHash(PTHEntryKeyVariant V) {
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
+
+ static hash_value_type ComputeHash(PTHEntryKeyVariant V) {
return llvm::HashString(V.getString());
}
typedef uint32_t data_type;
typedef data_type data_type_ref;
- static unsigned ComputeHash(PTHIdKey* key) {
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
+
+ static hash_value_type ComputeHash(PTHIdKey* key) {
return llvm::HashString(key->II->getName());
}
class PTHFileLookupCommonTrait {
public:
typedef std::pair<unsigned char, const char*> internal_key_type;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
- static unsigned ComputeHash(internal_key_type x) {
+ static hash_value_type ComputeHash(internal_key_type x) {
return llvm::HashString(x.second);
}
class PTHStringLookupTrait {
public:
- typedef uint32_t
- data_type;
-
- typedef const std::pair<const char*, unsigned>
- external_key_type;
-
+ typedef uint32_t data_type;
+ typedef const std::pair<const char*, unsigned> external_key_type;
typedef external_key_type internal_key_type;
+ typedef uint32_t hash_value_type;
+ typedef unsigned offset_type;
static bool EqualKey(const internal_key_type& a,
const internal_key_type& b) {
: false;
}
- static unsigned ComputeHash(const internal_key_type& a) {
+ static hash_value_type ComputeHash(const internal_key_type& a) {
return llvm::HashString(StringRef(a.first, a.second));
}
/// particular lookup t
typedef llvm::support::ulittle32_t LE32DeclID;
typedef std::pair<LE32DeclID *, LE32DeclID *> data_type;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
/// \brief Special internal key for declaration names.
/// The hash table creates keys for comparison; we do not create
return a.Kind == b.Kind && a.Data == b.Data;
}
- unsigned ComputeHash(const DeclNameKey &Key) const;
+ hash_value_type ComputeHash(const DeclNameKey &Key) const;
internal_key_type GetInternalKey(const external_key_type& Name) const;
static std::pair<unsigned, unsigned>
public:
typedef StringRef external_key_type;
typedef StringRef internal_key_type;
-
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
static bool EqualKey(const internal_key_type& a, const internal_key_type& b) {
return a == b;
}
- static unsigned ComputeHash(const internal_key_type& a);
+ static hash_value_type ComputeHash(const internal_key_type& a);
static std::pair<unsigned, unsigned>
ReadKeyDataLength(const unsigned char*& d);
typedef Selector external_key_type;
typedef external_key_type internal_key_type;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
ASTSelectorLookupTrait(ASTReader &Reader, ModuleFile &F)
: Reader(Reader), F(F) { }
return a == b;
}
- static unsigned ComputeHash(Selector Sel);
+ static hash_value_type ComputeHash(Selector Sel);
static const internal_key_type&
GetInternalKey(const external_key_type& x) { return x; }
typedef const internal_key_type &internal_key_ref;
typedef HeaderFileInfo data_type;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
HeaderFileInfoTrait(ASTReader &Reader, ModuleFile &M, HeaderSearch *HS,
const char *FrameworkStrings)
: Reader(Reader), M(M), HS(HS), FrameworkStrings(FrameworkStrings) { }
- static unsigned ComputeHash(internal_key_ref ikey);
+ static hash_value_type ComputeHash(internal_key_ref ikey);
static internal_key_type GetInternalKey(const FileEntry *FE);
bool EqualKey(internal_key_ref a, internal_key_ref b);
typedef HeaderFileInfo data_type;
typedef const data_type &data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
- static unsigned ComputeHash(key_type_ref key) {
+ static hash_value_type ComputeHash(key_type_ref key) {
// The hash is based only on size/time of the file, so that the reader can
// match even when symlinking or excess path elements ("foo/../", "../")
// change the form of the name. However, complete path is still the key.
typedef Data data_type;
typedef const data_type &data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
- static unsigned ComputeHash(IdentID IdID) {
+ static hash_value_type ComputeHash(IdentID IdID) {
return llvm::hash_value(IdID);
}
};
typedef const data_type& data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
+
explicit ASTMethodPoolTrait(ASTWriter &Writer) : Writer(Writer) { }
- static unsigned ComputeHash(Selector Sel) {
+ static hash_value_type ComputeHash(Selector Sel) {
return serialization::ComputeHash(Sel);
}
typedef IdentID data_type;
typedef data_type data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
+
ASTIdentifierTableTrait(ASTWriter &Writer, Preprocessor &PP,
IdentifierResolver &IdResolver, bool IsModule)
: Writer(Writer), PP(PP), IdResolver(IdResolver), IsModule(IsModule) { }
- static unsigned ComputeHash(const IdentifierInfo* II) {
+ static hash_value_type ComputeHash(const IdentifierInfo* II) {
return llvm::HashString(II->getName());
}
typedef DeclContext::lookup_result data_type;
typedef const data_type& data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
+
explicit ASTDeclContextNameLookupTrait(ASTWriter &Writer) : Writer(Writer) { }
- unsigned ComputeHash(DeclarationName Name) {
+ hash_value_type ComputeHash(DeclarationName Name) {
llvm::FoldingSetNodeID ID;
ID.AddInteger(Name.getNameKind());
typedef StringRef external_key_type;
typedef StringRef internal_key_type;
typedef SmallVector<unsigned, 2> data_type;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
static bool EqualKey(const internal_key_type& a, const internal_key_type& b) {
return a == b;
}
- static unsigned ComputeHash(const internal_key_type& a) {
+ static hash_value_type ComputeHash(const internal_key_type& a) {
return llvm::HashString(a);
}
typedef StringRef key_type_ref;
typedef SmallVector<unsigned, 2> data_type;
typedef const SmallVector<unsigned, 2> &data_type_ref;
+ typedef unsigned hash_value_type;
+ typedef unsigned offset_type;
- static unsigned ComputeHash(key_type_ref Key) {
+ static hash_value_type ComputeHash(key_type_ref Key) {
return llvm::HashString(Key);
}