From 1a18d7caa3e9b0bf9a64caa9ead2b849dd9070fb Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 7 May 2014 02:11:18 +0000 Subject: 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. llvm-svn: 208148 --- llvm/tools/llvm-cov/llvm-cov.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp') diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp index 02f4b72..9463609 100644 --- a/llvm/tools/llvm-cov/llvm-cov.cpp +++ b/llvm/tools/llvm-cov/llvm-cov.cpp @@ -47,6 +47,10 @@ static cl::opt 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 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 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); -- cgit v1.1