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 {
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.
/// 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: