summaryrefslogtreecommitdiff
path: root/tools/llvm-cov/SourceCoverageViewHTML.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-07-22 20:49:23 +0000
committerVedant Kumar <vsk@apple.com>2016-07-22 20:49:23 +0000
commitd12f3729fd1f386b0b47c032c206611ecf2bab36 (patch)
treed7a5bc9665da8a2cc48685f9a2ef9b7e17997d88 /tools/llvm-cov/SourceCoverageViewHTML.cpp
parentc119b4eab068f216ef8b57f73c99de33d86957d0 (diff)
[llvm-cov] Don't copy stylesheets into index files
Just link in the stylesheet from the toplevel dir of the report. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov/SourceCoverageViewHTML.cpp')
-rw-r--r--tools/llvm-cov/SourceCoverageViewHTML.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-cov/SourceCoverageViewHTML.cpp b/tools/llvm-cov/SourceCoverageViewHTML.cpp
index ceab5566e62..ef81ceaee17 100644
--- a/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -247,7 +247,8 @@ Error CoveragePrinterHTML::createIndexFile(ArrayRef<StringRef> SourceFiles) {
raw_ostream &OSRef = *OS.get();
// Emit a table containing links to reports for each file in the covmapping.
- emitPrelude(OSRef);
+ assert(Opts.hasOutputDirectory() && "No output directory for index file");
+ emitPrelude(OSRef, getPathToStyle(""));
OSRef << BeginSourceNameDiv << "Index" << EndSourceNameDiv;
OSRef << BeginTable;
for (StringRef SF : SourceFiles) {