LLVM 20.0.0git
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
CoverageMapping.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Object/BuildID.h"
#include "llvm/ProfileData/Coverage/MCDCTypes.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <iterator>
#include <memory>
#include <sstream>
#include <string>
#include <system_error>
#include <utility>
#include <vector>
#include "llvm/ProfileData/InstrProfData.inc"

Go to the source code of this file.

Classes

class  llvm::coverage::CoverageMapError
 
struct  llvm::coverage::Counter
 A Counter is an abstract value that describes how to compute the execution count for a region of code using the collected profile count data. More...
 
struct  llvm::coverage::CounterExpression
 A Counter expression is a value that represents an arithmetic operation with two counters. More...
 
class  llvm::coverage::CounterExpressionBuilder
 A Counter expression builder is used to construct the counter expressions. More...
 
struct  llvm::coverage::CounterMappingRegion
 A Counter mapping region associates a source range with a specific counter. More...
 
struct  llvm::coverage::CountedRegion
 Associates a source range with an execution count. More...
 
struct  llvm::coverage::MCDCRecord
 MCDC Record grouping all information together. More...
 
class  llvm::coverage::MCDCRecord::TestVector
 Emulate SmallVector<CondState> with a pair of BitVector. More...
 
class  llvm::coverage::mcdc::TVIdxBuilder
 Compute TestVector Indices "TVIdx" from the Conds graph. More...
 
struct  llvm::coverage::mcdc::TVIdxBuilder::MCDCNode
 
class  llvm::coverage::CounterMappingContext
 A Counter mapping context is used to connect the counters, expressions and the obtained counter values. More...
 
struct  llvm::coverage::FunctionRecord
 Code coverage information for a single function. More...
 
class  llvm::coverage::FunctionRecordIterator
 Iterator over Functions, optionally filtered to a single file. More...
 
struct  llvm::coverage::ExpansionRecord
 Coverage information for a macro expansion or #included file. More...
 
struct  llvm::coverage::CoverageSegment
 The execution count information starting at a point in a file. More...
 
class  llvm::coverage::InstantiationGroup
 An instantiation group contains a FunctionRecord list, such that each record corresponds to a distinct instantiation of the same function. More...
 
class  llvm::coverage::CoverageData
 Coverage information to be processed or displayed. More...
 
class  llvm::coverage::CoverageMapping
 The mapping of profile information to coverage data. More...
 
class  llvm::coverage::LineCoverageStats
 Coverage statistics for a single line. More...
 
class  llvm::coverage::LineCoverageIterator
 An iterator over the LineCoverageStats objects for lines described by a CoverageData instance. More...
 
struct  llvm::coverage::CovMapFunctionRecordV1< IntPtrT >
 
struct  llvm::coverage::CovMapFunctionRecordV2
 
struct  llvm::coverage::CovMapFunctionRecordV3
 
struct  llvm::coverage::CovMapHeader
 
struct  llvm::coverage::CovMapTraits< CovMapVersion, IntPtrT >
 
struct  llvm::coverage::CovMapTraits< CovMapVersion::Version3, IntPtrT >
 
struct  llvm::coverage::CovMapTraits< CovMapVersion::Version2, IntPtrT >
 
struct  llvm::coverage::CovMapTraits< CovMapVersion::Version1, IntPtrT >
 
struct  llvm::DenseMapInfo< coverage::CounterExpression >
 Provide DenseMapInfo for CounterExpression. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::object
 
namespace  llvm::vfs
 
namespace  llvm::coverage
 
namespace  llvm::coverage::mcdc
 
namespace  llvm::coverage::accessors
 This namespace defines accessors shared by different versions of coverage mapping records.
 

Macros

#define COVMAP_V1
 
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init)   Type Name;
 
#define COVMAP_V2
 
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init)   Type Name;
 
#define COVMAP_V3
 
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init)   Type Name;
 
#define COVMAP_HEADER(Type, LLVMType, Name, Init)   Type Name;
 

Typedefs

using llvm::coverage::LineColPair = std::pair< unsigned, unsigned >
 

Enumerations

enum class  llvm::coverage::coveragemap_error {
  llvm::coverage::success = 0 , llvm::coverage::eof , llvm::coverage::no_data_found , llvm::coverage::unsupported_version ,
  llvm::coverage::truncated , llvm::coverage::malformed , llvm::coverage::decompression_failed , llvm::coverage::invalid_or_missing_arch_specifier
}
 
enum  llvm::coverage::CovMapVersion {
  llvm::coverage::Version1 = 0 , llvm::coverage::Version2 = 1 , llvm::coverage::Version3 = 2 , llvm::coverage::Version4 = 3 ,
  llvm::coverage::Version5 = 4 , llvm::coverage::Version6 = 5 , llvm::coverage::Version7 = 6 , llvm::coverage::CurrentVersion = INSTR_PROF_COVMAP_VERSION
}
 
enum class  llvm::coverage::TestingFormatVersion : uint64_t { llvm::coverage::Version1 = 0x6174616474736574 , llvm::coverage::Version2 = 1 , llvm::coverage::CurrentVersion = Version2 }
 

Functions

const std::error_category & llvm::coverage::coveragemap_category ()
 
std::error_code llvm::coverage::make_error_code (coveragemap_error E)
 
static iterator_range< LineCoverageIterator > llvm::coverage::getLineCoverageStats (const coverage::CoverageData &CD)
 Get a LineCoverageIterator range for the lines described by CD.
 
template<class FuncRecordTy , llvm::endianness Endian>
uint64_t llvm::coverage::accessors::getFuncHash (const FuncRecordTy *Record)
 Return the structural hash associated with the function.
 
template<class FuncRecordTy , llvm::endianness Endian>
uint64_t llvm::coverage::accessors::getDataSize (const FuncRecordTy *Record)
 Return the coverage map data size for the function.
 
template<class FuncRecordTy , llvm::endianness Endian>
uint64_t llvm::coverage::accessors::getFuncNameRef (const FuncRecordTy *Record)
 Return the function lookup key. The value is considered opaque.
 
template<class FuncRecordTy , llvm::endianness Endian>
Error llvm::coverage::accessors::getFuncNameViaRef (const FuncRecordTy *Record, InstrProfSymtab &ProfileNames, StringRef &FuncName)
 Return the PGO name of the function.
 
template<class FuncRecordTy , llvm::endianness Endian>
StringRef llvm::coverage::accessors::getCoverageMappingOutOfLine (const FuncRecordTy *Record, const char *MappingBuf)
 Read coverage mapping out-of-line, from MappingBuf.
 
template<class FuncRecordTy , llvm::endianness Endian>
std::pair< const char *, const FuncRecordTy * > llvm::coverage::accessors::advanceByOneOutOfLine (const FuncRecordTy *Record, const char *MappingBuf)
 Advance to the next out-of-line coverage mapping and its associated function record.
 

Variables

constexpr uint64_t llvm::coverage::TestingFormatMagic = 0x6d766f636d766c6c
 

Macro Definition Documentation

◆ COVMAP_FUNC_RECORD [1/3]

#define COVMAP_FUNC_RECORD (   Type,
  LLVMType,
  Name,
  Init 
)    Type Name;

Definition at line 1287 of file CoverageMapping.h.

◆ COVMAP_FUNC_RECORD [2/3]

#define COVMAP_FUNC_RECORD (   Type,
  LLVMType,
  Name,
  Init 
)    Type Name;

Definition at line 1287 of file CoverageMapping.h.

◆ COVMAP_FUNC_RECORD [3/3]

#define COVMAP_FUNC_RECORD (   Type,
  LLVMType,
  Name,
  Init 
)    Type Name;

Definition at line 1287 of file CoverageMapping.h.

◆ COVMAP_HEADER

#define COVMAP_HEADER (   Type,
  LLVMType,
  Name,
  Init 
)    Type Name;

Definition at line 1340 of file CoverageMapping.h.

◆ COVMAP_V1

#define COVMAP_V1

Definition at line 1191 of file CoverageMapping.h.

◆ COVMAP_V2

#define COVMAP_V2

Definition at line 1242 of file CoverageMapping.h.

◆ COVMAP_V3

#define COVMAP_V3

Definition at line 1286 of file CoverageMapping.h.