diff options
author | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-19 20:33:32 +0000 |
---|---|---|
committer | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-19 20:33:32 +0000 |
commit | d6fde400c9ddadaa04d533b0855aff20e4751fb3 (patch) | |
tree | d263c6701b08686ef8655bf99f81c50002a6a840 /include/llvm/Support | |
parent | 5903eca0d9731d92329322d1a25b81525691dffd (diff) | |
download | llvm-d6fde400c9ddadaa04d533b0855aff20e4751fb3.tar.gz llvm-d6fde400c9ddadaa04d533b0855aff20e4751fb3.tar.bz2 llvm-d6fde400c9ddadaa04d533b0855aff20e4751fb3.tar.xz |
llvm-cov: Added constness property to methods.
Added constness to methods that shouldn't modify objects. Replaced
operator[] lookup in maps with find() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/GCOV.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Support/GCOV.h b/include/llvm/Support/GCOV.h index 0aa716aac0..0fbe86c3c5 100644 --- a/include/llvm/Support/GCOV.h +++ b/include/llvm/Support/GCOV.h @@ -196,7 +196,7 @@ public: GCOVFile() : Functions(), RunCount(0), ProgramCount(0) {} ~GCOVFile(); bool read(GCOVBuffer &Buffer); - void dump(); + void dump() const; void collectLineCounts(FileInfo &FI); private: SmallVector<GCOVFunction *, 16> Functions; @@ -211,7 +211,7 @@ public: ~GCOVFunction(); bool read(GCOVBuffer &Buffer, GCOV::GCOVFormat Format); StringRef getFilename() const { return Filename; } - void dump(); + void dump() const; void collectLineCounts(FileInfo &FI); private: uint32_t Ident; @@ -230,8 +230,8 @@ public: void addEdge(uint32_t N) { Edges.push_back(N); } void addLine(uint32_t N) { Lines.push_back(N); } void addCount(uint64_t N) { Counter += N; } - size_t getNumEdges() { return Edges.size(); } - void dump(); + size_t getNumEdges() const { return Edges.size(); } + void dump() const; void collectLineCounts(FileInfo &FI); private: GCOVFunction &Parent; @@ -249,7 +249,7 @@ public: } void setRunCount(uint32_t Runs) { RunCount = Runs; } void setProgramCount(uint32_t Programs) { ProgramCount = Programs; } - void print(raw_fd_ostream &OS, StringRef gcnoFile, StringRef gcdaFile); + void print(raw_fd_ostream &OS, StringRef gcnoFile, StringRef gcdaFile) const; private: StringMap<LineCounts> LineInfo; uint32_t RunCount; |