1 //===- diagtool_main.h - Entry point for invoking all diagnostic tools ----===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements the main function for diagtool.
11 //===----------------------------------------------------------------------===//
15 using namespace diagtool
;
17 int main(int argc
, char *argv
[]) {
19 if (DiagTool
*tool
= diagTools
->getTool(argv
[1]))
20 return tool
->run(argc
- 2, &argv
[2], llvm::outs());
22 llvm::errs() << "usage: diagtool <command> [<args>]\n\n";
23 diagTools
->printCommands(llvm::errs());