1 //===- SourceCoverageDataManager.h - Manager for source file coverage data-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class separates and merges mapping regions for a specific source file.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
15 #define LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
17 #include "llvm/ProfileData/CoverageMapping.h"
22 /// \brief Partions mapping regions by their kind and sums
23 /// the execution counts of the regions that start at the same location.
24 class SourceCoverageDataManager {
25 std::vector<coverage::CountedRegion> Regions;
29 SourceCoverageDataManager() : Uniqued(false) {}
31 void insert(const coverage::CountedRegion &CR);
33 /// \brief Return the source regions in order of first to last occurring.
34 ArrayRef<coverage::CountedRegion> getSourceRegions();
39 #endif // LLVM_COV_SOURCECOVERAGEDATAMANAGER_H