From de2703ddfb7730fcfaf718f89b1561a539240a72 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 23 Apr 2014 21:44:55 +0000 Subject: llvm-cov: Add support for gcov's --long-file-names option GCOV provides an option to prepend output file names with the source file name, to disambiguate between covered data that's included from multiple sources. Add a flag to llvm-cov that does the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207035 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/GCOV.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/llvm/Support/GCOV.h b/include/llvm/Support/GCOV.h index ae7e4a969a..923affcd0b 100644 --- a/include/llvm/Support/GCOV.h +++ b/include/llvm/Support/GCOV.h @@ -37,9 +37,9 @@ namespace GCOV { /// GCOVOptions - A struct for passing gcov options between functions. struct GCOVOptions { - GCOVOptions(bool A, bool B, bool C, bool F, bool P, bool U) + GCOVOptions(bool A, bool B, bool C, bool F, bool P, bool U, bool L) : AllBlocks(A), BranchInfo(B), BranchCount(C), FuncCoverage(F), - PreservePaths(P), UncondBranch(U) {} + PreservePaths(P), UncondBranch(U), LongFileNames(L) {} bool AllBlocks; bool BranchInfo; @@ -47,6 +47,7 @@ struct GCOVOptions { bool FuncCoverage; bool PreservePaths; bool UncondBranch; + bool LongFileNames; }; /// GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific @@ -385,7 +386,8 @@ public: } void setRunCount(uint32_t Runs) { RunCount = Runs; } void setProgramCount(uint32_t Programs) { ProgramCount = Programs; } - void print(StringRef GCNOFile, StringRef GCDAFile); + void print(StringRef MainFilename, StringRef GCNOFile, StringRef GCDAFile); + private: void printFunctionSummary(raw_fd_ostream &OS, const FunctionVector &Funcs) const; -- cgit v1.2.3