LLVM  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
llvm::coverage::Counter Struct Reference

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...

#include "llvm/ProfileData/Coverage/CoverageMapping.h"

Collaboration diagram for llvm::coverage::Counter:
Collaboration graph
[legend]

Public Types

enum  CounterKind { Zero, CounterValueReference, Expression }
 

Public Member Functions

 Counter ()=default
 
CounterKind getKind () const
 
bool isZero () const
 
bool isExpression () const
 
unsigned getCounterID () const
 
unsigned getExpressionID () const
 

Static Public Member Functions

static Counter getZero ()
 Return the counter that represents the number zero. More...
 
static Counter getCounter (unsigned CounterId)
 Return the counter that corresponds to a specific profile counter. More...
 
static Counter getExpression (unsigned ExpressionId)
 Return the counter that corresponds to a specific addition counter expression. More...
 

Static Public Attributes

static const unsigned EncodingTagBits = 2
 
static const unsigned EncodingTagMask = 0x3
 
static const unsigned EncodingCounterTagAndExpansionRegionTagBits
 

Friends

bool operator== (const Counter &LHS, const Counter &RHS)
 
bool operator!= (const Counter &LHS, const Counter &RHS)
 
bool operator< (const Counter &LHS, const Counter &RHS)
 

Detailed Description

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.

Definition at line 90 of file CoverageMapping.h.

Member Enumeration Documentation

◆ CounterKind

Enumerator
Zero 
CounterValueReference 
Expression 

Definition at line 91 of file CoverageMapping.h.

Constructor & Destructor Documentation

◆ Counter()

llvm::coverage::Counter::Counter ( )
default

Member Function Documentation

◆ getCounter()

static Counter llvm::coverage::Counter::getCounter ( unsigned  CounterId)
inlinestatic

◆ getCounterID()

unsigned llvm::coverage::Counter::getCounterID ( ) const
inline

◆ getExpression()

static Counter llvm::coverage::Counter::getExpression ( unsigned  ExpressionId)
inlinestatic

Return the counter that corresponds to a specific addition counter expression.

Definition at line 138 of file CoverageMapping.h.

Referenced by llvm::coverage::RawCoverageFilenamesReader::read(), and llvm::coverage::CoverageFilenamesSectionWriter::write().

◆ getExpressionID()

unsigned llvm::coverage::Counter::getExpressionID ( ) const
inline

◆ getKind()

CounterKind llvm::coverage::Counter::getKind ( ) const
inline

◆ getZero()

static Counter llvm::coverage::Counter::getZero ( )
inlinestatic

Return the counter that represents the number zero.

Definition at line 129 of file CoverageMapping.h.

Referenced by llvm::coverage::RawCoverageFilenamesReader::read().

◆ isExpression()

bool llvm::coverage::Counter::isExpression ( ) const
inline

◆ isZero()

bool llvm::coverage::Counter::isZero ( ) const
inline

Definition at line 108 of file CoverageMapping.h.

Referenced by llvm::coverage::CoverageMappingWriter::write().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Counter LHS,
const Counter RHS 
)
friend

Definition at line 120 of file CoverageMapping.h.

◆ operator<

bool operator< ( const Counter LHS,
const Counter RHS 
)
friend

Definition at line 124 of file CoverageMapping.h.

◆ operator==

bool operator== ( const Counter LHS,
const Counter RHS 
)
friend

Definition at line 116 of file CoverageMapping.h.

Member Data Documentation

◆ EncodingCounterTagAndExpansionRegionTagBits

const unsigned llvm::coverage::Counter::EncodingCounterTagAndExpansionRegionTagBits
static
Initial value:

Definition at line 94 of file CoverageMapping.h.

Referenced by llvm::coverage::CoverageMappingWriter::write().

◆ EncodingTagBits

const unsigned llvm::coverage::Counter::EncodingTagBits = 2
static

◆ EncodingTagMask

const unsigned llvm::coverage::Counter::EncodingTagMask = 0x3
static

The documentation for this struct was generated from the following file: