From 1c60993799ad7ade9eea6f2603525d2086e90729 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 18 Apr 2014 22:00:22 +0000 Subject: ProfileData: Don't forward declare ComputeHash and make it static inline git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206663 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ProfileData/InstrProfIndexed.h | 2 +- lib/ProfileData/InstrProfReader.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/ProfileData') diff --git a/lib/ProfileData/InstrProfIndexed.h b/lib/ProfileData/InstrProfIndexed.h index 87eb4c3a02..ede5368ca2 100644 --- a/lib/ProfileData/InstrProfIndexed.h +++ b/lib/ProfileData/InstrProfIndexed.h @@ -36,7 +36,7 @@ static inline uint64_t MD5Hash(StringRef Str) { return endian::read(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/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index c8d2c2781c..4f110a5712 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -243,6 +243,11 @@ template class RawInstrProfReader; template class RawInstrProfReader; } +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; -- cgit v1.2.3