LLVM API Documentation
Reader for the coverage mapping data that is emitted by the frontend and stored in an object file. More...
#include <CoverageMappingReader.h>
Classes | |
struct | ProfileMappingRecord |
Public Member Functions | |
ObjectFileCoverageMappingReader (StringRef FileName) | |
ObjectFileCoverageMappingReader (std::unique_ptr< MemoryBuffer > &ObjectBuffer, sys::fs::file_magic Type=sys::fs::file_magic::unknown) | |
std::error_code | readHeader () |
std::error_code | readNextRecord (CoverageMappingRecord &Record) |
CoverageMappingIterator | begin () |
Iterator over profile data. | |
CoverageMappingIterator | end () |
bool | isEOF () |
Return true if the reader has finished reading the profile data. | |
bool | hasError () |
Return true if the reader encountered an error reading profiling data. | |
std::error_code | getError () |
Get the current error code. |
Reader for the coverage mapping data that is emitted by the frontend and stored in an object file.
Definition at line 142 of file CoverageMappingReader.h.
ObjectFileCoverageMappingReader::ObjectFileCoverageMappingReader | ( | StringRef | FileName | ) |
Definition at line 282 of file CoverageMappingReader.cpp.
References llvm::object::ObjectFile::createObjectFile(), and llvm::ARMBuildAttrs::File.
ObjectFileCoverageMappingReader::ObjectFileCoverageMappingReader | ( | std::unique_ptr< MemoryBuffer > & | ObjectBuffer, |
sys::fs::file_magic | Type = sys::fs::file_magic::unknown |
||
) |
Definition at line 443 of file CoverageMappingReader.cpp.
References llvm::object::ObjectFile::createObjectFile(), decodeTestingFormat(), llvm::ARMBuildAttrs::File, TestingFormatMagic, and Type.
Iterator over profile data.
Definition at line 194 of file CoverageMappingReader.h.
Definition at line 195 of file CoverageMappingReader.h.
std::error_code llvm::coverage::ObjectFileCoverageMappingReader::getError | ( | ) | [inline] |
Get the current error code.
Definition at line 203 of file CoverageMappingReader.h.
Referenced by readHeader().
Return true if the reader encountered an error reading profiling data.
Definition at line 201 of file CoverageMappingReader.h.
References isEOF().
Return true if the reader has finished reading the profile data.
Definition at line 198 of file CoverageMappingReader.h.
References llvm::eof.
Referenced by hasError().
std::error_code ObjectFileCoverageMappingReader::readHeader | ( | ) |
Definition at line 471 of file CoverageMappingReader.cpp.
References llvm::bad_header, llvm::object::OwningBinary< T >::getBinary(), llvm::object::ObjectFile::getBytesInAddress(), llvm::object::SectionRef::getContents(), getError(), llvm::object::SectionRef::getName(), llvm::malformed, Name, llvm::ARMBuildAttrs::Section, and llvm::object::ObjectFile::sections().
std::error_code ObjectFileCoverageMappingReader::readNextRecord | ( | CoverageMappingRecord & | Record | ) |
Definition at line 520 of file CoverageMappingReader.cpp.
References llvm::eof, llvm::coverage::CoverageMappingRecord::FunctionHash, llvm::makeArrayRef(), and llvm::coverage::RawCoverageMappingReader::read().