summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/llvm-cov.cpp
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
commit1a18d7caa3e9b0bf9a64caa9ead2b849dd9070fb (patch)
tree26d8a09934ed5738e19e9030008fa4489b75468c /llvm/tools/llvm-cov/llvm-cov.cpp
parente185d2886208794eb1d792d35a8011fa9baa564c (diff)
downloadbcm5719-llvm-1a18d7caa3e9b0bf9a64caa9ead2b849dd9070fb.tar.gz
bcm5719-llvm-1a18d7caa3e9b0bf9a64caa9ead2b849dd9070fb.zip
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
Diffstat (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp')
-rw-r--r--llvm/tools/llvm-cov/llvm-cov.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp
index 02f4b722169..9463609ae3d 100644
--- a/llvm/tools/llvm-cov/llvm-cov.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud