LLVM API Documentation

Public Types | Public Member Functions | Public Attributes | Static Public Attributes
llvm::coverage::CounterMappingRegion Struct Reference

A Counter mapping region associates a source range with a specific counter. More...

#include <CoverageMapping.h>

Inheritance diagram for llvm::coverage::CounterMappingRegion:
Inheritance graph
[legend]
Collaboration diagram for llvm::coverage::CounterMappingRegion:
Collaboration graph
[legend]

List of all members.

Public Types

enum  RegionKind { CodeRegion, ExpansionRegion, SkippedRegion }

Public Member Functions

 CounterMappingRegion (Counter Count, unsigned FileID, unsigned LineStart, unsigned ColumnStart, unsigned LineEnd, unsigned ColumnEnd, bool HasCodeBefore=false, RegionKind Kind=CodeRegion)
std::pair< unsigned, unsignedstartLoc () const
std::pair< unsigned, unsignedendLoc () const
bool operator< (const CounterMappingRegion &Other) const
bool contains (const CounterMappingRegion &Other) const

Public Attributes

Counter Count
unsigned FileID
unsigned ExpandedFileID
unsigned LineStart
unsigned ColumnStart
unsigned LineEnd
unsigned ColumnEnd
RegionKind Kind
bool HasCodeBefore
 A flag that is set to true when there is already code before this region on the same line. This is useful to accurately compute the execution counts for a line.

Static Public Attributes

static const unsigned EncodingHasCodeBeforeBits = 1

Detailed Description

A Counter mapping region associates a source range with a specific counter.

Definition at line 133 of file CoverageMapping.h.


Member Enumeration Documentation

Enumerator:
CodeRegion 

A CodeRegion associates some code with a counter.

ExpansionRegion 

An ExpansionRegion represents a file expansion region that associates a source range with the expansion of a virtual source file, such as for a macro instantiation or #include file.

SkippedRegion 

A SkippedRegion represents a source range with code that was skipped by a preprocessor or similar means.

Definition at line 134 of file CoverageMapping.h.


Constructor & Destructor Documentation

llvm::coverage::CounterMappingRegion::CounterMappingRegion ( Counter  Count,
unsigned  FileID,
unsigned  LineStart,
unsigned  ColumnStart,
unsigned  LineEnd,
unsigned  ColumnEnd,
bool  HasCodeBefore = false,
RegionKind  Kind = CodeRegion 
) [inline]

Definition at line 159 of file CoverageMapping.h.


Member Function Documentation

Definition at line 181 of file CoverageMapping.h.

References endLoc(), FileID, and startLoc().

Definition at line 171 of file CoverageMapping.h.

References ColumnEnd, and LineEnd.

Referenced by contains().

bool llvm::coverage::CounterMappingRegion::operator< ( const CounterMappingRegion Other) const [inline]

Definition at line 175 of file CoverageMapping.h.

References FileID, and startLoc().

Definition at line 167 of file CoverageMapping.h.

References ColumnStart, and LineStart.

Referenced by contains(), and operator<().


Member Data Documentation

Definition at line 152 of file CoverageMapping.h.

Referenced by endLoc().

Definition at line 152 of file CoverageMapping.h.

Referenced by startLoc().

Definition at line 150 of file CoverageMapping.h.

Definition at line 148 of file CoverageMapping.h.

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

Definition at line 151 of file CoverageMapping.h.

Definition at line 151 of file CoverageMapping.h.

Referenced by contains(), and operator<().

A flag that is set to true when there is already code before this region on the same line. This is useful to accurately compute the execution counts for a line.

Definition at line 157 of file CoverageMapping.h.

Definition at line 153 of file CoverageMapping.h.

Definition at line 152 of file CoverageMapping.h.

Referenced by endLoc().

Definition at line 152 of file CoverageMapping.h.

Referenced by startLoc().


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