1 //===----------------------------------------------------------------------===//
2 // LLVM BugPoint Utility
4 // This program is an automated compiler debugger tool. It is used to narrow
5 // down miscompilations and crash problems to a specific pass in the compiler,
6 // and the specific Module or Function input that is causing the problem.
8 //===----------------------------------------------------------------------===//
10 #include "BugDriver.h"
11 #include "Support/CommandLine.h"
12 #include "llvm/Support/PassNameParser.h"
14 static cl::list<std::string>
15 InputFilenames(cl::Positional, cl::OneOrMore,
16 cl::desc("<input llvm ll/bc files>"));
18 // The AnalysesList is automatically populated with registered Passes by the
21 static cl::list<const PassInfo*, bool, PassNameParser>
22 PassList(cl::desc("Passes available:"), cl::OneOrMore);
24 //cl::list<std::string>
25 //InputArgv(cl::ConsumeAfter, cl::desc("<program arguments>..."));
28 //Verbose("v", cl::desc("Enable verbose output"));
30 int main(int argc, char **argv) {
31 cl::ParseCommandLineOptions(argc, argv);
35 if (D.addSources(InputFilenames)) return 1;
36 D.addPasses(PassList.begin(), PassList.end());