X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FSupport%2FCommandLine.cpp;h=0351d285bca4e78a9e38534f5c3b4570928472f6;hp=35c49be02ced7f95a8cc9552d1b70359a8b8c775;hb=0213b090b87629f88fca9eff4d80b9a2ee2c7266;hpb=4990e83b7bdc50caba375f37ece7f4c04000640c diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 35c49be02ce..0351d285bca 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -83,129 +83,172 @@ void StringSaver::anchor() {} //===----------------------------------------------------------------------===// -// Globals for name and overview of program. Program name is not a string to -// avoid static ctor/dtor issues. -static char ProgramName[80] = ""; -static const char *ProgramOverview = nullptr; +namespace { -// This collects additional help to be printed. -static ManagedStatic> MoreHelp; +class CommandLineParser { +public: + // Globals for name and overview of program. Program name is not a string to + // avoid static ctor/dtor issues. + std::string ProgramName; + const char *ProgramOverview; -extrahelp::extrahelp(const char *Help) : morehelp(Help) { - MoreHelp->push_back(Help); -} + // This collects additional help to be printed. + std::vector MoreHelp; -static bool OptionListChanged = false; + SmallVector