From 5d23224f21e8d60e896709c7f330ce25b9a8c739 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 13 Jan 2015 19:14:20 +0000 Subject: Running clang-format on CommandLine.h and CommandLine.cpp. No functional changes, I'm just going to be doing a lot of work in these files and it would be helpful if they had more current LLVM style. llvm-svn: 225817 --- llvm/lib/Support/CommandLine.cpp | 535 +++++++++++++++++++-------------------- 1 file changed, 262 insertions(+), 273 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 7b06219104e..40570cab7cc 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -44,7 +44,8 @@ using namespace cl; //===----------------------------------------------------------------------===// // Template instantiations and anchors. // -namespace llvm { namespace cl { +namespace llvm { +namespace cl { TEMPLATE_INSTANTIATION(class basic_parser); TEMPLATE_INSTANTIATION(class basic_parser); TEMPLATE_INSTANTIATION(class basic_parser); @@ -60,7 +61,8 @@ TEMPLATE_INSTANTIATION(class opt); TEMPLATE_INSTANTIATION(class opt); TEMPLATE_INSTANTIATION(class opt); TEMPLATE_INSTANTIATION(class opt); -} } // end namespace llvm::cl +} +} // end namespace llvm::cl // Pin the vtables to this file. void GenericOptionValue::anchor() {} @@ -87,19 +89,16 @@ static char ProgramName[80] = ""; static const char *ProgramOverview = nullptr; // This collects additional help to be printed. -static ManagedStatic > MoreHelp; +static ManagedStatic> MoreHelp; -extrahelp::extrahelp(const char *Help) - : morehelp(Help) { +extrahelp::extrahelp(const char *Help) : morehelp(Help) { MoreHelp->push_back(Help); } static bool OptionListChanged = false; // MarkOptionsChanged - Internal helper function. -void cl::MarkOptionsChanged() { - OptionListChanged = true; -} +void cl::MarkOptionsChanged() { OptionListChanged = true; } /// RegisteredOptionList - This is the list of the command line options that /// have statically constructed themselves. @@ -127,7 +126,7 @@ void Option::removeArgument() { } // This collects the different option categories that have been registered. -typedef SmallPtrSet OptionCatSet; +typedef SmallPtrSet OptionCatSet; static ManagedStatic RegisteredOptionCategories; // Initialise the general option category. @@ -138,7 +137,8 @@ void OptionCategory::registerCategory() { RegisteredOptionCategories->end(), [this](const OptionCategory *Category) { return getName() == Category->getName(); - }) == 0 && "Duplicate option categories"); + }) == 0 && + "Duplicate option categories"); RegisteredOptionCategories->insert(this); } @@ -149,12 +149,12 @@ void OptionCategory::registerCategory() { /// GetOptionInfo - Scan the list of registered options, turning them into data /// structures that are easier to handle. -static void GetOptionInfo(SmallVectorImpl &PositionalOpts, - SmallVectorImpl &SinkOpts, - StringMap &OptionsMap) { +static void GetOptionInfo(SmallVectorImpl