diff options
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r-- | llvm/lib/ProfileData/InstrProfIndexed.h | 2 | ||||
-rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/InstrProfIndexed.h b/llvm/lib/ProfileData/InstrProfIndexed.h index 87eb4c3a027..ede5368ca2c 100644 --- a/llvm/lib/ProfileData/InstrProfIndexed.h +++ b/llvm/lib/ProfileData/InstrProfIndexed.h @@ -36,7 +36,7 @@ static inline uint64_t MD5Hash(StringRef Str) { return endian::read<uint64_t, little, unaligned>(Result); } -uint64_t ComputeHash(HashT Type, StringRef K) { +static inline uint64_t ComputeHash(HashT Type, StringRef K) { switch (Type) { case HashT::MD5: return IndexedInstrProf::MD5Hash(K); diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index c8d2c2781c7..4f110a57122 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -243,6 +243,11 @@ template class RawInstrProfReader<uint32_t>; template class RawInstrProfReader<uint64_t>; } +InstrProfLookupTrait::hash_value_type +InstrProfLookupTrait::ComputeHash(StringRef K) { + return IndexedInstrProf::ComputeHash(HashType, K); +} + bool IndexedInstrProfReader::hasFormat(const MemoryBuffer &DataBuffer) { if (DataBuffer.getBufferSize() < 8) return false; |