summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-26 09:21:56 +0000
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-26 09:21:56 +0000
commit65b1f6fe0acea882cbfbb1992dc8a5b4b301d27e (patch)
tree001ec17cf7dcbacf9d27357f39808d843ed1705a /include
parent7b3bfc8151f3a6bcd9642c49c1f86f66cc43a428 (diff)
Allow users of the GCOV API to extend the FileInfo class to implement custom output formats
Summary: The GCOV API can be used to parse gcda/gcno files, but in order to implement custom output formats, users need to reimplement everything. If the FileInfo members were protected instead of private, they'd be able to reuse the code. Reviewers: bogner, davide, scott.smith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41802 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ProfileData/GCOV.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ProfileData/GCOV.h b/include/llvm/ProfileData/GCOV.h
index d9ab39e3946..8500401e44a 100644
--- a/include/llvm/ProfileData/GCOV.h
+++ b/include/llvm/ProfileData/GCOV.h
@@ -376,6 +376,7 @@ private:
};
class FileInfo {
+protected:
// It is unlikely--but possible--for multiple functions to be on the same
// line.
// Therefore this typedef allows LineData.Functions to store multiple
@@ -428,7 +429,7 @@ public:
void print(raw_ostream &OS, StringRef MainFilename, StringRef GCNOFile,
StringRef GCDAFile);
-private:
+protected:
std::string getCoveragePath(StringRef Filename, StringRef MainFilename);
std::unique_ptr<raw_ostream> openCoveragePath(StringRef CoveragePath);
void printFunctionSummary(raw_ostream &OS, const FunctionVector &Funcs) const;