summaryrefslogtreecommitdiff
path: root/tools/llvm-cov
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-cov')
-rw-r--r--tools/llvm-cov/llvm-cov.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp
index 8e2cf95153..02f4b72216 100644
--- a/tools/llvm-cov/llvm-cov.cpp
+++ b/tools/llvm-cov/llvm-cov.cpp
@@ -39,6 +39,10 @@ static cl::opt<bool> BranchCount("c", cl::Grouping, cl::init(false),
"of percentages (requires -b)"));
static cl::alias BranchCountA("branch-counts", cl::aliasopt(BranchCount));
+static cl::opt<bool> LongNames("l", cl::Grouping, cl::init(false),
+ cl::desc("Prefix filenames with the main file"));
+static cl::alias LongNamesA("long-file-names", cl::aliasopt(LongNames));
+
static cl::opt<bool> FuncSummary("f", cl::Grouping, cl::init(false),
cl::desc("Show coverage for each function"));
static cl::alias FuncSummaryA("function-summaries", cl::aliasopt(FuncSummary));
@@ -126,9 +130,9 @@ int main(int argc, char **argv) {
GF.dump();
GCOVOptions Options(AllBlocks, BranchProb, BranchCount, FuncSummary,
- PreservePaths, UncondBranch);
+ PreservePaths, UncondBranch, LongNames);
FileInfo FI(Options);
GF.collectLineCounts(FI);
- FI.print(InputGCNO, InputGCDA);
+ FI.print(SourceFile, InputGCNO, InputGCDA);
return 0;
}