|
LLVM
4.0.0
|
The mapping of profile information to coverage data. More...
#include <CoverageMapping.h>
Public Member Functions | |
| unsigned | getMismatchedCount () |
| The number of functions that couldn't have their profiles mapped. More... | |
| std::vector< StringRef > | getUniqueSourceFiles () const |
| Returns a lexicographically sorted, unique list of files that are covered. More... | |
| CoverageData | getCoverageForFile (StringRef Filename) const |
| Get the coverage for a particular file. More... | |
| iterator_range < FunctionRecordIterator > | getCoveredFunctions () const |
| Gets all of the functions covered by this profile. More... | |
| iterator_range < FunctionRecordIterator > | getCoveredFunctions (StringRef Filename) const |
| Gets all of the functions in a particular file. More... | |
| std::vector< const FunctionRecord * > | getInstantiations (StringRef Filename) const |
| Get the list of function instantiations in the file. More... | |
| CoverageData | getCoverageForFunction (const FunctionRecord &Function) const |
| Get the coverage for a particular function. More... | |
| CoverageData | getCoverageForExpansion (const ExpansionRecord &Expansion) const |
| Get the coverage for an expansion within a coverage set. More... | |
Static Public Member Functions | |
| static Expected < std::unique_ptr < CoverageMapping > > | load (CoverageMappingReader &CoverageReader, IndexedInstrProfReader &ProfileReader) |
| Load the coverage mapping using the given readers. More... | |
| static Expected < std::unique_ptr < CoverageMapping > > | load (ArrayRef< std::unique_ptr< CoverageMappingReader >> CoverageReaders, IndexedInstrProfReader &ProfileReader) |
| static Expected < std::unique_ptr < CoverageMapping > > | load (StringRef ObjectFilename, StringRef ProfileFilename, StringRef Arch=StringRef()) |
| Load the coverage mapping from the given files. More... | |
| static Expected < std::unique_ptr < CoverageMapping > > | load (ArrayRef< StringRef > ObjectFilenames, StringRef ProfileFilename, StringRef Arch=StringRef()) |
The mapping of profile information to coverage data.
This is the main interface to get coverage information, using a profile to fill out execution counts.
Definition at line 422 of file CoverageMapping.h.
| CoverageData CoverageMapping::getCoverageForExpansion | ( | const ExpansionRecord & | Expansion | ) | const |
Get the coverage for an expansion within a coverage set.
Definition at line 550 of file CoverageMapping.cpp.
References llvm::coverage::FunctionRecord::CountedRegions, llvm::dbgs(), DEBUG, llvm::coverage::ExpansionRecord::FileID, llvm::coverage::FunctionRecord::Filenames, llvm::coverage::ExpansionRecord::Function, and isExpansion().
| CoverageData CoverageMapping::getCoverageForFile | ( | StringRef | Filename | ) | const |
Get the coverage for a particular file.
The given filename must be the name as recorded in the coverage information. That is, only names returned from getUniqueSourceFiles will yield a result.
Definition at line 488 of file CoverageMapping.cpp.
References llvm::coverage::FunctionRecord::CountedRegions, llvm::dbgs(), DEBUG, findMainViewFileID(), gatherFileIDs(), and isExpansion().
| CoverageData CoverageMapping::getCoverageForFunction | ( | const FunctionRecord & | Function | ) | const |
Get the coverage for a particular function.
Definition at line 530 of file CoverageMapping.cpp.
References llvm::coverage::FunctionRecord::CountedRegions, llvm::dbgs(), DEBUG, llvm::coverage::FunctionRecord::Filenames, findMainViewFileID(), isExpansion(), and llvm::coverage::FunctionRecord::Name.
|
inline |
Gets all of the functions covered by this profile.
Definition at line 475 of file CoverageMapping.h.
References llvm::make_range().
Referenced by getUniqueSourceFiles().
|
inline |
Gets all of the functions in a particular file.
Definition at line 482 of file CoverageMapping.h.
References llvm::make_range().
| std::vector< const FunctionRecord * > CoverageMapping::getInstantiations | ( | StringRef | Filename | ) | const |
Get the list of function instantiations in the file.
Functions that are instantiated more than once, such as C++ template specializations, have distinct coverage records for each instantiation.
Definition at line 510 of file CoverageMapping.cpp.
References findMainViewFileID().
|
inline |
The number of functions that couldn't have their profiles mapped.
This is a count of functions whose profile is out of date or otherwise can't be associated with any coverage information.
Definition at line 461 of file CoverageMapping.h.
| std::vector< StringRef > CoverageMapping::getUniqueSourceFiles | ( | ) | const |
Returns a lexicographically sorted, unique list of files that are covered.
Definition at line 442 of file CoverageMapping.cpp.
References llvm::coverage::FunctionRecord::Filenames, and getCoveredFunctions().
|
static |
Load the coverage mapping using the given readers.
Definition at line 235 of file CoverageMapping.cpp.
References E.
Referenced by load().
|
static |
Definition at line 246 of file CoverageMapping.cpp.
References E.
|
inlinestatic |
Load the coverage mapping from the given files.
Definition at line 448 of file CoverageMapping.h.
References load().
|
static |
Definition at line 260 of file CoverageMapping.cpp.
References llvm::coverage::BinaryCoverageReader::create(), llvm::IndexedInstrProfReader::create(), E, llvm::errorCodeToError(), llvm::MemoryBuffer::getFileOrSTDIN(), load(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
1.8.6