LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
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 <CoverageMapping.h>

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

List of all members.

Public Types

enum  CounterKind { Zero, CounterValueReference, Expression }

Public Member Functions

 Counter ()
CounterKind getKind () const
bool isZero () const
bool isExpression () const
unsigned getCounterID () const
unsigned getExpressionID () const
bool operator== (const Counter &Other) const

Static Public Member Functions

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

Static Public Attributes

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

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 32 of file CoverageMapping.h.


Member Enumeration Documentation

Enumerator:
Zero 
CounterValueReference 
Expression 

Definition at line 33 of file CoverageMapping.h.


Constructor & Destructor Documentation

llvm::coverage::Counter::Counter ( ) [inline]

Definition at line 46 of file CoverageMapping.h.

Referenced by getCounter(), getExpression(), and getZero().


Member Function Documentation

static Counter llvm::coverage::Counter::getCounter ( unsigned  CounterId) [inline, static]

Return the counter that corresponds to a specific profile counter.

Definition at line 66 of file CoverageMapping.h.

References Counter(), and CounterValueReference.

static Counter llvm::coverage::Counter::getExpression ( unsigned  ExpressionId) [inline, static]

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

Definition at line 72 of file CoverageMapping.h.

References Counter(), and Expression.

static Counter llvm::coverage::Counter::getZero ( ) [inline, static]

Return the counter that represents the number zero.

Definition at line 63 of file CoverageMapping.h.

References Counter().

Definition at line 52 of file CoverageMapping.h.

References Expression.

Referenced by encodeCounter().

Definition at line 50 of file CoverageMapping.h.

References Zero.

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

bool llvm::coverage::Counter::operator== ( const Counter Other) const [inline]

Definition at line 58 of file CoverageMapping.h.


Member Data Documentation

Initial value:

Definition at line 36 of file CoverageMapping.h.

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

Definition at line 35 of file CoverageMapping.h.


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