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

@ -227,11 +227,11 @@ public:
return std::make_pair(KeyLen, DataLen);
}
StringRef ReadKey(const unsigned char *D, unsigned N) {
StringRef ReadKey(const unsigned char *D, offset_type N) {
return StringRef((const char *)D, N);
}
InstrProfRecord ReadData(StringRef K, const unsigned char *D, unsigned N) {
InstrProfRecord ReadData(StringRef K, const unsigned char *D, offset_type N) {
if (N < 2 * sizeof(uint64_t) || N % sizeof(uint64_t)) {
// The data is corrupt, don't try to read it.
CountBuffer.clear();