LLVM API Documentation
A Counter mapping context is used to connect the counters, expressions and the obtained counter values. More...
#include <CoverageMapping.h>
Public Member Functions | |
CounterMappingContext (ArrayRef< CounterExpression > Expressions, ArrayRef< uint64_t > CounterValues=ArrayRef< uint64_t >()) | |
void | dump (const Counter &C, llvm::raw_ostream &OS) const |
void | dump (const Counter &C) const |
ErrorOr< int64_t > | evaluate (const Counter &C) const |
Return the number of times that a region of code associated with this counter was executed. |
A Counter mapping context is used to connect the counters, expressions and the obtained counter values.
Definition at line 202 of file CoverageMapping.h.
llvm::coverage::CounterMappingContext::CounterMappingContext | ( | ArrayRef< CounterExpression > | Expressions, |
ArrayRef< uint64_t > | CounterValues = ArrayRef<uint64_t>() |
||
) | [inline] |
Definition at line 207 of file CoverageMapping.h.
void CounterMappingContext::dump | ( | const Counter & | C, |
llvm::raw_ostream & | OS | ||
) | const |
Definition at line 91 of file CoverageMapping.cpp.
References llvm::coverage::Counter::CounterValueReference, llvm::ArrayRef< T >::empty(), evaluate(), llvm::coverage::Counter::Expression, llvm::coverage::Counter::getCounterID(), llvm::coverage::Counter::getExpressionID(), llvm::coverage::Counter::getKind(), llvm::coverage::CounterExpression::Kind, llvm::coverage::CounterExpression::LHS, llvm::coverage::CounterExpression::RHS, llvm::ArrayRef< T >::size(), llvm::coverage::CounterExpression::Subtract, and llvm::coverage::Counter::Zero.
void llvm::coverage::CounterMappingContext::dump | ( | const Counter & | C | ) | const [inline] |
Definition at line 212 of file CoverageMapping.h.
References dump(), and llvm::outs().
Referenced by dump().
ErrorOr< int64_t > CounterMappingContext::evaluate | ( | const Counter & | C | ) | const |
Return the number of times that a region of code associated with this counter was executed.
Definition at line 120 of file CoverageMapping.cpp.
References llvm::argument_out_of_domain, llvm::coverage::Counter::CounterValueReference, llvm::coverage::Counter::Expression, llvm::coverage::Counter::getCounterID(), llvm::coverage::Counter::getExpressionID(), llvm::coverage::Counter::getKind(), llvm::coverage::CounterExpression::Kind, llvm::coverage::CounterExpression::LHS, llvm_unreachable, llvm::make_error_code(), llvm::coverage::CounterExpression::RHS, llvm::ArrayRef< T >::size(), llvm::coverage::CounterExpression::Subtract, and llvm::coverage::Counter::Zero.
Referenced by dump().