aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CacheTokens.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-04-18 20:27:24 +0000
committerJustin Bogner <mail@justinbogner.com>2014-04-18 20:27:24 +0000
commit25463f15771d18a863838d099716eba631a51b65 (patch)
tree6d550edec81058d8801ebc509f2e74de20c18ec9 /clang/lib/Frontend/CacheTokens.cpp
parentbe0a7ac5e85b893d8837b81440082212dc144769 (diff)
downloadllvm-25463f15771d18a863838d099716eba631a51b65.zip
llvm-25463f15771d18a863838d099716eba631a51b65.tar.gz
llvm-25463f15771d18a863838d099716eba631a51b65.tar.bz2
Teach users of OnDiskHashTable to define hash_value and offset types
This paves the way to making OnDiskHashTable work with hashes that are not 32 bits wide and to making OnDiskHashTable work very large hash tables. The LLVM change to use these types is upcoming. llvm-svn: 206640
Diffstat (limited to 'clang/lib/Frontend/CacheTokens.cpp')
-rw-r--r--clang/lib/Frontend/CacheTokens.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CacheTokens.cpp b/clang/lib/Frontend/CacheTokens.cpp
index 0d4d1c4..bf1c968 100644
--- a/clang/lib/Frontend/CacheTokens.cpp
+++ b/clang/lib/Frontend/CacheTokens.cpp
@@ -117,7 +117,10 @@ public:
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());
}
@@ -599,7 +602,10 @@ public:
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());
}