[llvm-cov] Minor cleanups to prepare for the html format patch
- Add renderView{Header,Footer}, renderLineSuffix, and hasSubViews to
support creating tables with nested views.
- Move the 'Format' cl::opt to make it easier to extend.
- Just create one function view file, instead of overwriting the same
file for every new function. Add a regression test for this.
llvm-svn: 274086
diff --git a/llvm/test/tools/llvm-cov/report.cpp b/llvm/test/tools/llvm-cov/report.cpp
index 3322e1a..45d582a 100644
--- a/llvm/test/tools/llvm-cov/report.cpp
+++ b/llvm/test/tools/llvm-cov/report.cpp
@@ -33,3 +33,10 @@
bar();
return 0;
}
+
+// Test that listing multiple functions in a function view works.
+// RUN: llvm-cov show -o %t.dir %S/Inputs/report.covmapping -instr-profile=%S/Inputs/report.profdata -filename-equivalence -name-regex=".*" %s
+// RUN: FileCheck -check-prefix=FUNCTIONS -input-file %t.dir/functions.txt %s
+// FUNCTIONS: _Z3foob
+// FUNCTIONS: _Z3barv
+// FUNCTIONS: _Z4func