diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h index 6afde56122f..30571ce9217 100644 --- a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h +++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h @@ -418,12 +418,16 @@ public: /// \brief Get the name of the file this data covers. StringRef getFilename() const { return Filename; } - std::vector<CoverageSegment>::iterator begin() { return Segments.begin(); } - std::vector<CoverageSegment>::iterator end() { return Segments.end(); } - bool empty() { return Segments.empty(); } + std::vector<CoverageSegment>::const_iterator begin() const { + return Segments.begin(); + } + std::vector<CoverageSegment>::const_iterator end() const { + return Segments.end(); + } + bool empty() const { return Segments.empty(); } /// \brief Expansions that can be further processed. - ArrayRef<ExpansionRecord> getExpansions() { return Expansions; } + ArrayRef<ExpansionRecord> getExpansions() const { return Expansions; } }; /// \brief The mapping of profile information to coverage data. |

