mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:37:07 +08:00
[Coverage] Define LineColPair for convenience. NFC.
llvm-svn: 312815
This commit is contained in:
@@ -198,6 +198,8 @@ public:
|
||||
Counter subtract(Counter LHS, Counter RHS);
|
||||
};
|
||||
|
||||
using LineColPair = std::pair<unsigned, unsigned>;
|
||||
|
||||
/// A Counter mapping region associates a source range with a specific counter.
|
||||
struct CounterMappingRegion {
|
||||
enum RegionKind {
|
||||
@@ -248,13 +250,11 @@ struct CounterMappingRegion {
|
||||
LineEnd, ColumnEnd, SkippedRegion);
|
||||
}
|
||||
|
||||
inline std::pair<unsigned, unsigned> startLoc() const {
|
||||
return std::pair<unsigned, unsigned>(LineStart, ColumnStart);
|
||||
inline LineColPair startLoc() const {
|
||||
return LineColPair(LineStart, ColumnStart);
|
||||
}
|
||||
|
||||
inline std::pair<unsigned, unsigned> endLoc() const {
|
||||
return std::pair<unsigned, unsigned>(LineEnd, ColumnEnd);
|
||||
}
|
||||
inline LineColPair endLoc() const { return LineColPair(LineEnd, ColumnEnd); }
|
||||
};
|
||||
|
||||
/// Associates a source range with an execution count.
|
||||
|
||||
@@ -295,8 +295,7 @@ namespace {
|
||||
/// An instantiation set is a collection of functions that have the same source
|
||||
/// code, ie, template functions specializations.
|
||||
class FunctionInstantiationSetCollector {
|
||||
using MapT = DenseMap<std::pair<unsigned, unsigned>,
|
||||
std::vector<const FunctionRecord *>>;
|
||||
using MapT = DenseMap<LineColPair, std::vector<const FunctionRecord *>>;
|
||||
MapT InstantiatedFunctions;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user