RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -filename-equivalence %S/showTemplateInstantiations.cpp -format html | FileCheck %s -check-prefix=NODIR
RUN: FileCheck %s -input-file=%t.dir/style.css -check-prefix=STYLE
-RUN: FileCheck %s -input-file=%t.dir/functions.html -check-prefix=FUNCTIONS
+RUN: FileCheck %s -input-file=%t.dir/functions.html -check-prefix=TOPLEVEL
+RUN: FileCheck %s -input-file=%t.dir/index.html -check-prefix=TOPLEVEL
RUN: FileCheck %s -input-file=%t.dir/coverage/tmp/showTemplateInstantiations.cpp.html -check-prefix=FILEVIEW
STYLE-DAG: .red
STYLE-DAG: .tooltip
STYLE-DAG: .tooltip span.tooltip-content
-FUNCTIONS-NOT: <style>
-FUNCTIONS: <head>
-FUNCTIONS: <link rel='stylesheet' type='text/css' href='style.css'>
-FUNCTIONS: </head>
+TOPLEVEL-NOT: <style>
+TOPLEVEL: <head>
+TOPLEVEL: <link rel='stylesheet' type='text/css' href='style.css'>
+TOPLEVEL: </head>
FILEVIEW-NOT: <style>
FILEVIEW: <head>
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) {