summaryrefslogtreecommitdiff
path: root/tools/llvm-cov
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-05-07 02:11:18 +0000
committerJustin Bogner <mail@justinbogner.com>2014-05-07 02:11:18 +0000
commit56d05e468cdfd4ad195f264974f1b841bc4ca785 (patch)
tree6b64409c6ba060df470fa71f1a73f671869d32e3 /tools/llvm-cov
parent6d46f2d3941474d5db59c0dc4e85779ca1af3376 (diff)
downloadllvm-56d05e468cdfd4ad195f264974f1b841bc4ca785.tar.gz
llvm-56d05e468cdfd4ad195f264974f1b841bc4ca785.tar.bz2
llvm-56d05e468cdfd4ad195f264974f1b841bc4ca785.tar.xz
llvm-cov: Implement --no-output
In gcov, there's a -n/--no-output option, which disables the writing of any .gcov files, so that it emits only the summary info on stdout. This implements the same behaviour in llvm-cov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov')
-rw-r--r--tools/llvm-cov/llvm-cov.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp
index 02f4b72216..9463609ae3 100644
--- a/tools/llvm-cov/llvm-cov.cpp
+++ b/tools/llvm-cov/llvm-cov.cpp
@@ -47,6 +47,10 @@ 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));
+static cl::opt<bool> NoOutput("n", cl::Grouping, cl::init(false),
+ cl::desc("Do not output any .gcov files"));
+static cl::alias NoOutputA("no-output", cl::aliasopt(NoOutput));
+
static cl::opt<std::string>
ObjectDir("o", cl::value_desc("DIR|FILE"), cl::init(""),
cl::desc("Find objects in DIR or based on FILE's path"));
@@ -130,7 +134,7 @@ int main(int argc, char **argv) {
GF.dump();
GCOVOptions Options(AllBlocks, BranchProb, BranchCount, FuncSummary,
- PreservePaths, UncondBranch, LongNames);
+ PreservePaths, UncondBranch, LongNames, NoOutput);
FileInfo FI(Options);
GF.collectLineCounts(FI);
FI.print(SourceFile, InputGCNO, InputGCDA);