1 //===- bugpoint.cpp - The LLVM BugPoint utility ---------------------------===//
3 // This program is an automated compiler debugger tool. It is used to narrow
4 // down miscompilations and crash problems to a specific pass in the compiler,
5 // and the specific Module or Function input that is causing the problem.
7 //===----------------------------------------------------------------------===//
10 #include "Support/CommandLine.h"
11 #include "llvm/Support/PassNameParser.h"
13 static cl::list<std::string>
14 InputFilenames(cl::Positional, cl::OneOrMore,
15 cl::desc("<input llvm ll/bc files>"));
17 // The AnalysesList is automatically populated with registered Passes by the
20 static cl::list<const PassInfo*, bool, PassNameParser>
21 PassList(cl::desc("Passes available:"), cl::ZeroOrMore);
23 //cl::list<std::string>
24 //InputArgv(cl::ConsumeAfter, cl::desc("<program arguments>..."));
26 int main(int argc, char **argv) {
27 cl::ParseCommandLineOptions(argc, argv);
30 if (D.addSources(InputFilenames)) return 1;
31 D.addPasses(PassList.begin(), PassList.end());