diff options
author | Alex Lorenz <arphaman@gmail.com> | 2014-08-21 19:23:25 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2014-08-21 19:23:25 +0000 |
commit | 936b99c94279db95ecd6da1615957488752043ca (patch) | |
tree | ba577dac948724809e2a672cc27e238526439c4d /llvm/lib/ProfileData/CoverageMappingReader.cpp | |
parent | 40bfd6db5705d1f9de43441b5c48aa55d9f5283a (diff) | |
download | bcm5719-llvm-936b99c94279db95ecd6da1615957488752043ca.tar.gz bcm5719-llvm-936b99c94279db95ecd6da1615957488752043ca.zip |
Coverage Mapping: add function's hash to coverage function records.
The profile data format was recently updated and the new indexing api
requires the code coverage tool to know the function's hash as well
as the function's name to get the execution counts for a function.
Differential Revision: http://reviews.llvm.org/D4994
llvm-svn: 216207
Diffstat (limited to 'llvm/lib/ProfileData/CoverageMappingReader.cpp')
-rw-r--r-- | llvm/lib/ProfileData/CoverageMappingReader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/CoverageMappingReader.cpp b/llvm/lib/ProfileData/CoverageMappingReader.cpp index 965e085f9d9..f10ae05c0f9 100644 --- a/llvm/lib/ProfileData/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/CoverageMappingReader.cpp @@ -308,6 +308,7 @@ template <typename IntPtrT> struct CoverageMappingFunctionRecord { IntPtrT FunctionNamePtr; uint32_t FunctionNameSize; uint32_t CoverageMappingSize; + uint64_t FunctionHash; }; /// \brief The coverage mapping data for a single translation unit. @@ -422,8 +423,8 @@ std::error_code readCoverageMappingData( FunctionName)) return Err; Records.push_back(ObjectFileCoverageMappingReader::ProfileMappingRecord( - Version, FunctionName, Mapping, FilenamesBegin, - Filenames.size() - FilenamesBegin)); + Version, FunctionName, MappingRecord.FunctionHash, Mapping, + FilenamesBegin, Filenames.size() - FilenamesBegin)); } } @@ -485,6 +486,7 @@ ObjectFileCoverageMappingReader::readNextRecord(CoverageMappingRecord &Record) { FunctionsFilenames, Expressions, MappingRegions); if (auto Err = Reader.read(Record)) return Err; + Record.FunctionHash = R.FunctionHash; ++CurrentRecord; return success(); } |