diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-04-23 21:44:55 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-04-23 21:44:55 +0000 |
commit | de2703ddfb7730fcfaf718f89b1561a539240a72 (patch) | |
tree | b4b9e4885dc9f8fc282680137e148396b3d224ff /include/llvm | |
parent | edcd7c718f9312d3ca6d3501d8b844760b648cd3 (diff) | |
download | llvm-de2703ddfb7730fcfaf718f89b1561a539240a72.tar.gz llvm-de2703ddfb7730fcfaf718f89b1561a539240a72.tar.bz2 llvm-de2703ddfb7730fcfaf718f89b1561a539240a72.tar.xz |
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
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Support/GCOV.h | 8 |
1 files changed, 5 insertions, 3 deletions
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; |