LLVM 20.0.0git
|
A Counter expression builder is used to construct the counter expressions. More...
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
Public Types | |
using | SubstMap = std::map< Counter, Counter > |
K to V map. | |
Public Member Functions | |
ArrayRef< CounterExpression > | getExpressions () const |
Counter | add (Counter LHS, Counter RHS, bool Simplify=true) |
Return a counter that represents the expression that adds LHS and RHS. | |
Counter | subtract (Counter LHS, Counter RHS, bool Simplify=true) |
Return a counter that represents the expression that subtracts RHS from LHS. | |
Counter | subst (Counter C, const SubstMap &Map) |
A Counter expression builder is used to construct the counter expressions.
It avoids unnecessary duplication and simplifies algebraic expressions.
Definition at line 175 of file CoverageMapping.h.
using llvm::coverage::CounterExpressionBuilder::SubstMap = std::map<Counter, Counter> |
K to V map.
K will be Counter in most cases. V may be Counter or Expression.
Definition at line 221 of file CoverageMapping.h.
Return a counter that represents the expression that adds LHS and RHS.
Definition at line 127 of file CoverageMapping.cpp.
References llvm::coverage::CounterExpression::Add, LHS, RHS, and simplify.
Referenced by subst().
|
inline |
Definition at line 210 of file CoverageMapping.h.
Map
. Definition at line 138 of file CoverageMapping.cpp.
References llvm::coverage::CounterExpression::Add, add(), llvm::CallingConv::C, I, subst(), llvm::coverage::CounterExpression::Subtract, and subtract().
Referenced by subst().
Return a counter that represents the expression that subtracts RHS from LHS.
Definition at line 132 of file CoverageMapping.cpp.
References LHS, RHS, simplify, and llvm::coverage::CounterExpression::Subtract.
Referenced by subst().