blob: 66a73e947a1730c09ddac3d6dc64561c68480d50 [file] [log] [blame]
Ted Kremenekf88d3352011-08-09 03:39:19 +00001//===- diagtool_main.h - Entry point for invoking all diagnostic tools ----===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the main function for diagtool.
11//
12//===----------------------------------------------------------------------===//
13
14#include "DiagTool.h"
15
16using namespace diagtool;
17
18int main(int argc, char *argv[]) {
19 if (argc > 1)
20 if (DiagTool *tool = diagTools.getTool(argv[1]))
21 return tool->run(argc - 1, &argv[2], llvm::errs());
22
23 llvm::errs() << "usage: diagtool <command> [<args>]\n\n";
24 diagTools.printCommands(llvm::errs());
25 return 1;
26}