diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
| commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
| tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /include/llvm/ProfileData/Coverage | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Notes
Diffstat (limited to 'include/llvm/ProfileData/Coverage')
3 files changed, 13 insertions, 12 deletions
diff --git a/include/llvm/ProfileData/Coverage/CoverageMapping.h b/include/llvm/ProfileData/Coverage/CoverageMapping.h index 5a4098cf666c..1ca56dcaf9c5 100644 --- a/include/llvm/ProfileData/Coverage/CoverageMapping.h +++ b/include/llvm/ProfileData/Coverage/CoverageMapping.h @@ -17,6 +17,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/None.h" #include "llvm/ADT/StringRef.h" @@ -506,7 +507,7 @@ public: /// This is the main interface to get coverage information, using a profile to /// fill out execution counts. class CoverageMapping { - StringSet<> FunctionNames; + DenseMap<size_t, DenseSet<size_t>> RecordProvenance; std::vector<FunctionRecord> Functions; std::vector<std::pair<std::string, uint64_t>> FuncHashMismatches; std::vector<std::pair<std::string, uint64_t>> FuncCounterMismatches; diff --git a/include/llvm/ProfileData/Coverage/CoverageMappingReader.h b/include/llvm/ProfileData/Coverage/CoverageMappingReader.h index 633e51565cd2..c88c71a6d6f4 100644 --- a/include/llvm/ProfileData/Coverage/CoverageMappingReader.h +++ b/include/llvm/ProfileData/Coverage/CoverageMappingReader.h @@ -32,7 +32,7 @@ namespace coverage { class CoverageMappingReader; -/// \brief Coverage mapping information for a single function. +/// Coverage mapping information for a single function. struct CoverageMappingRecord { StringRef FunctionName; uint64_t FunctionHash; @@ -41,7 +41,7 @@ struct CoverageMappingRecord { ArrayRef<CounterMappingRegion> MappingRegions; }; -/// \brief A file format agnostic iterator over coverage mapping data. +/// A file format agnostic iterator over coverage mapping data. class CoverageMappingIterator : public std::iterator<std::input_iterator_tag, CoverageMappingRecord> { CoverageMappingReader *Reader; @@ -101,7 +101,7 @@ public: CoverageMappingIterator end() { return CoverageMappingIterator(); } }; -/// \brief Base class for the raw coverage mapping and filenames data readers. +/// Base class for the raw coverage mapping and filenames data readers. class RawCoverageReader { protected: StringRef Data; @@ -114,7 +114,7 @@ protected: Error readString(StringRef &Result); }; -/// \brief Reader for the raw coverage filenames. +/// Reader for the raw coverage filenames. class RawCoverageFilenamesReader : public RawCoverageReader { std::vector<StringRef> &Filenames; @@ -128,7 +128,7 @@ public: Error read(); }; -/// \brief Checks if the given coverage mapping data is exported for +/// Checks if the given coverage mapping data is exported for /// an unused function. class RawCoverageMappingDummyChecker : public RawCoverageReader { public: @@ -138,7 +138,7 @@ public: Expected<bool> isDummy(); }; -/// \brief Reader for the raw coverage mapping data. +/// Reader for the raw coverage mapping data. class RawCoverageMappingReader : public RawCoverageReader { ArrayRef<StringRef> TranslationUnitFilenames; std::vector<StringRef> &Filenames; @@ -169,7 +169,7 @@ private: unsigned InferredFileID, size_t NumFileIDs); }; -/// \brief Reader for the coverage mapping data that is emitted by the +/// Reader for the coverage mapping data that is emitted by the /// frontend and stored in an object file. class BinaryCoverageReader : public CoverageMappingReader { public: diff --git a/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h b/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h index b6f864ab3de3..86fb1bdf1773 100644 --- a/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h +++ b/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h @@ -25,7 +25,7 @@ class raw_ostream; namespace coverage { -/// \brief Writer of the filenames section for the instrumentation +/// Writer of the filenames section for the instrumentation /// based code coverage. class CoverageFilenamesSectionWriter { ArrayRef<StringRef> Filenames; @@ -34,11 +34,11 @@ public: CoverageFilenamesSectionWriter(ArrayRef<StringRef> Filenames) : Filenames(Filenames) {} - /// \brief Write encoded filenames to the given output stream. + /// Write encoded filenames to the given output stream. void write(raw_ostream &OS); }; -/// \brief Writer for instrumentation based coverage mapping data. +/// Writer for instrumentation based coverage mapping data. class CoverageMappingWriter { ArrayRef<unsigned> VirtualFileMapping; ArrayRef<CounterExpression> Expressions; @@ -51,7 +51,7 @@ public: : VirtualFileMapping(VirtualFileMapping), Expressions(Expressions), MappingRegions(MappingRegions) {} - /// \brief Write encoded coverage mapping data to the given output stream. + /// Write encoded coverage mapping data to the given output stream. void write(raw_ostream &OS); }; |
