Skip to content

Commit

Permalink
Allow users of the GCOV API to extend the FileInfo class to implement…
Browse files Browse the repository at this point in the history
… 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

llvm-svn: 338013
  • Loading branch information
marco-c committed Jul 26, 2018
1 parent 1720113 commit 89f1a8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/include/llvm/ProfileData/GCOV.h
Expand Up @@ -376,6 +376,7 @@ class GCOVBlock {
};

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
Expand Down Expand Up @@ -428,7 +429,7 @@ class FileInfo {
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;
Expand Down

0 comments on commit 89f1a8c

Please sign in to comment.