1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[Coverage] Define LineColPair for convenience. NFC.

llvm-svn: 312815
This commit is contained in:
Vedant Kumar 2017-09-08 18:44:48 +00:00
parent 1f8d584579
commit 4ed6c792a6
2 changed files with 6 additions and 7 deletions

View File

@ -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.

View File

@ -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: