Coverage Report

Created: 2020-09-19 12:23

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/tools/diagtool/diagtool_main.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- diagtool_main.h - Entry point for invoking all diagnostic tools ----===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file implements the main function for diagtool.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "DiagTool.h"
14
15
using namespace diagtool;
16
17
23
int main(int argc, char *argv[]) {
18
23
  if (argc > 1)
19
23
    if (DiagTool *tool = diagTools->getTool(argv[1]))
20
23
      return tool->run(argc - 2, &argv[2], llvm::outs());
21
0
22
0
  llvm::errs() << "usage: diagtool <command> [<args>]\n\n";
23
0
  diagTools->printCommands(llvm::errs());
24
0
  return 1;    
25
0
}