diff options
author | Vedant Kumar <vsk@apple.com> | 2016-06-29 21:55:46 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-06-29 21:55:46 +0000 |
commit | d6d192cd12db3a813e7e70d0ed579093b71277d1 (patch) | |
tree | 6ecfd82d84595b63f9a69fd67feee0cd65642ce9 /llvm/tools/llvm-cov/SourceCoverageView.h | |
parent | 30ece958dbf3f5a97f0282da49b125e04657288d (diff) | |
download | llvm-d6d192cd12db3a813e7e70d0ed579093b71277d1.zip llvm-d6d192cd12db3a813e7e70d0ed579093b71277d1.tar.gz llvm-d6d192cd12db3a813e7e70d0ed579093b71277d1.tar.bz2 |
[llvm-cov] Use relative paths to file reports in -output-dir mode
This makes it possible to e.g copy a report to another filesystem.
llvm-svn: 274173
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageView.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h index 98e68b6..feef959 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.h +++ b/llvm/tools/llvm-cov/SourceCoverageView.h @@ -111,9 +111,11 @@ public: protected: CoveragePrinter(const CoverageViewOptions &Opts) : Opts(Opts) {} - /// \brief Return `OutputDir/ToplevelDir/Path.Extension`. + /// \brief Return `OutputDir/ToplevelDir/Path.Extension`. If \p InToplevel is + /// false, skip the ToplevelDir component. If \p Relative is false, skip the + /// OutputDir component. std::string getOutputPath(StringRef Path, StringRef Extension, - bool InToplevel); + bool InToplevel, bool Relative = true); /// \brief If directory output is enabled, create a file in that directory /// at the path given by getOutputPath(). Otherwise, return stdout. |