OnDiskHashTable: Audit types and use offset_type consistently

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner
2014-04-19 00:33:15 +00:00
parent e382065b82
commit 55c1e1bd26
3 changed files with 13 additions and 12 deletions

View File

@@ -42,21 +42,21 @@ public:
using namespace llvm::support;
endian::Writer<little> LE(Out);
unsigned N = K.size();
offset_type N = K.size();
LE.write<offset_type>(N);
unsigned M = (1 + V.Counts.size()) * sizeof(uint64_t);
offset_type M = (1 + V.Counts.size()) * sizeof(uint64_t);
LE.write<offset_type>(M);
return std::make_pair(N, M);
}
static void EmitKey(raw_ostream &Out, key_type_ref K, unsigned N){
static void EmitKey(raw_ostream &Out, key_type_ref K, offset_type N){
Out.write(K.data(), N);
}
static void EmitData(raw_ostream &Out, key_type_ref, data_type_ref V,
unsigned) {
offset_type) {
using namespace llvm::support;
endian::Writer<little> LE(Out);
LE.write<uint64_t>(V.Hash);