@@ -67,10 +67,10 @@ namespace cl {
6767// that give precedence to earlier occurrences, you will need to extend this
6868// function to support it correctly.
6969LLVM_ABI bool ParseCommandLineOptions (int argc, const char *const *argv,
70- StringRef Overview = " " ,
71- raw_ostream *Errs = nullptr ,
72- const char *EnvVar = nullptr ,
73- bool LongOptionsUseDoubleDash = false );
70+ StringRef Overview = " " ,
71+ raw_ostream *Errs = nullptr ,
72+ const char *EnvVar = nullptr ,
73+ bool LongOptionsUseDoubleDash = false );
7474
7575// Function pointer type for printing version information.
7676using VersionPrinterTy = std::function<void (raw_ostream &)>;
@@ -891,7 +891,8 @@ template <class DataType> class parser : public generic_parser_base {
891891// --------------------------------------------------
892892// Super class of parsers to provide boilerplate code
893893//
894- class LLVM_ABI basic_parser_impl { // non-template implementation of basic_parser<t>
894+ class LLVM_ABI
895+ basic_parser_impl { // non-template implementation of basic_parser<t>
895896public:
896897 basic_parser_impl (Option &) {}
897898
@@ -969,7 +970,8 @@ template <> class LLVM_ABI parser<bool> : public basic_parser<bool> {
969970
970971extern template class LLVM_TEMPLATE_ABI basic_parser<boolOrDefault>;
971972
972- template <> class LLVM_ABI parser<boolOrDefault> : public basic_parser<boolOrDefault> {
973+ template <>
974+ class LLVM_ABI parser<boolOrDefault> : public basic_parser<boolOrDefault> {
973975public:
974976 parser (Option &O) : basic_parser(O) {}
975977
@@ -1079,7 +1081,8 @@ template <> class LLVM_ABI parser<unsigned> : public basic_parser<unsigned> {
10791081extern template class LLVM_TEMPLATE_ABI basic_parser<unsigned long >;
10801082
10811083template <>
1082- class LLVM_ABI parser<unsigned long > final : public basic_parser<unsigned long > {
1084+ class LLVM_ABI parser<unsigned long > final
1085+ : public basic_parser<unsigned long > {
10831086public:
10841087 parser (Option &O) : basic_parser(O) {}
10851088
@@ -1101,7 +1104,8 @@ class LLVM_ABI parser<unsigned long> final : public basic_parser<unsigned long>
11011104extern template class LLVM_TEMPLATE_ABI basic_parser<unsigned long long >;
11021105
11031106template <>
1104- class LLVM_ABI parser<unsigned long long > : public basic_parser<unsigned long long > {
1107+ class LLVM_ABI parser<unsigned long long >
1108+ : public basic_parser<unsigned long long > {
11051109public:
11061110 parser (Option &O) : basic_parser(O) {}
11071111
@@ -1165,7 +1169,8 @@ template <> class LLVM_ABI parser<float> : public basic_parser<float> {
11651169
11661170extern template class LLVM_TEMPLATE_ABI basic_parser<std::string>;
11671171
1168- template <> class LLVM_ABI parser<std::string> : public basic_parser<std::string> {
1172+ template <>
1173+ class LLVM_ABI parser<std::string> : public basic_parser<std::string> {
11691174public:
11701175 parser (Option &O) : basic_parser(O) {}
11711176
@@ -2079,8 +2084,8 @@ getRegisteredSubcommands();
20792084// / lines and end of the response file to be marked with a nullptr string.
20802085// / \param [out] NewArgv All parsed strings are appended to NewArgv.
20812086LLVM_ABI void TokenizeGNUCommandLine (StringRef Source, StringSaver &Saver,
2082- SmallVectorImpl<const char *> &NewArgv,
2083- bool MarkEOLs = false );
2087+ SmallVectorImpl<const char *> &NewArgv,
2088+ bool MarkEOLs = false );
20842089
20852090// / Tokenizes a string of Windows command line arguments, which may contain
20862091// / quotes and escaped quotes.
@@ -2097,15 +2102,16 @@ LLVM_ABI void TokenizeGNUCommandLine(StringRef Source, StringSaver &Saver,
20972102// / lines and end of the response file to be marked with a nullptr string.
20982103// / \param [out] NewArgv All parsed strings are appended to NewArgv.
20992104LLVM_ABI void TokenizeWindowsCommandLine (StringRef Source, StringSaver &Saver,
2100- SmallVectorImpl<const char *> &NewArgv,
2101- bool MarkEOLs = false );
2105+ SmallVectorImpl<const char *> &NewArgv,
2106+ bool MarkEOLs = false );
21022107
21032108// / Tokenizes a Windows command line while attempting to avoid copies. If no
21042109// / quoting or escaping was used, this produces substrings of the original
21052110// / string. If a token requires unquoting, it will be allocated with the
21062111// / StringSaver.
2107- LLVM_ABI void TokenizeWindowsCommandLineNoCopy (StringRef Source, StringSaver &Saver,
2108- SmallVectorImpl<StringRef> &NewArgv);
2112+ LLVM_ABI void
2113+ TokenizeWindowsCommandLineNoCopy (StringRef Source, StringSaver &Saver,
2114+ SmallVectorImpl<StringRef> &NewArgv);
21092115
21102116// / Tokenizes a Windows full command line, including command name at the start.
21112117// /
@@ -2120,9 +2126,10 @@ LLVM_ABI void TokenizeWindowsCommandLineNoCopy(StringRef Source, StringSaver &Sa
21202126// / if you set MarkEOLs = true, then the first word of every line will be
21212127// / parsed using the special rules for command names, making this function
21222128// / suitable for parsing a file full of commands to execute.
2123- LLVM_ABI void TokenizeWindowsCommandLineFull (StringRef Source, StringSaver &Saver,
2124- SmallVectorImpl<const char *> &NewArgv,
2125- bool MarkEOLs = false );
2129+ LLVM_ABI void
2130+ TokenizeWindowsCommandLineFull (StringRef Source, StringSaver &Saver,
2131+ SmallVectorImpl<const char *> &NewArgv,
2132+ bool MarkEOLs = false );
21262133
21272134// / String tokenization function type. Should be compatible with either
21282135// / Windows or Unix command line tokenizers.
@@ -2140,8 +2147,8 @@ using TokenizerCallback = void (*)(StringRef Source, StringSaver &Saver,
21402147// / It works like TokenizeGNUCommandLine with ability to skip comment lines.
21412148// /
21422149LLVM_ABI void tokenizeConfigFile (StringRef Source, StringSaver &Saver,
2143- SmallVectorImpl<const char *> &NewArgv,
2144- bool MarkEOLs = false );
2150+ SmallVectorImpl<const char *> &NewArgv,
2151+ bool MarkEOLs = false );
21452152
21462153// / Contains options that control response file expansion.
21472154class LLVM_ABI ExpansionContext {
@@ -2234,21 +2241,23 @@ class LLVM_ABI ExpansionContext {
22342241// / environment variable EnvVar and command line options, then expands
22352242// / response files recursively.
22362243// / \return true if all @files were expanded successfully or there were none.
2237- LLVM_ABI bool expandResponseFiles (int Argc, const char *const *Argv, const char *EnvVar,
2238- SmallVectorImpl<const char *> &NewArgv);
2244+ LLVM_ABI bool expandResponseFiles (int Argc, const char *const *Argv,
2245+ const char *EnvVar,
2246+ SmallVectorImpl<const char *> &NewArgv);
22392247
22402248// / A convenience helper which supports the typical use case of expansion
22412249// / function call.
2242- LLVM_ABI bool ExpandResponseFiles (StringSaver &Saver, TokenizerCallback Tokenizer,
2243- SmallVectorImpl<const char *> &Argv);
2250+ LLVM_ABI bool ExpandResponseFiles (StringSaver &Saver,
2251+ TokenizerCallback Tokenizer,
2252+ SmallVectorImpl<const char *> &Argv);
22442253
22452254// / A convenience helper which concatenates the options specified by the
22462255// / environment variable EnvVar and command line options, then expands response
22472256// / files recursively. The tokenizer is a predefined GNU or Windows one.
22482257// / \return true if all @files were expanded successfully or there were none.
2249- LLVM_ABI bool expandResponseFiles (int Argc, const char *const *Argv, const char *EnvVar,
2250- StringSaver &Saver,
2251- SmallVectorImpl<const char *> &NewArgv);
2258+ LLVM_ABI bool expandResponseFiles (int Argc, const char *const *Argv,
2259+ const char *EnvVar, StringSaver &Saver,
2260+ SmallVectorImpl<const char *> &NewArgv);
22522261
22532262// / Mark all options not part of this category as cl::ReallyHidden.
22542263// /
@@ -2258,7 +2267,7 @@ LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv, const char
22582267// / not specific to the tool. This function allows a tool to specify a single
22592268// / option category to display in the -help output.
22602269LLVM_ABI void HideUnrelatedOptions (cl::OptionCategory &Category,
2261- SubCommand &Sub = SubCommand::getTopLevel());
2270+ SubCommand &Sub = SubCommand::getTopLevel());
22622271
22632272// / Mark all options not part of the categories as cl::ReallyHidden.
22642273// /
@@ -2267,8 +2276,9 @@ LLVM_ABI void HideUnrelatedOptions(cl::OptionCategory &Category,
22672276// / Some tools (like clang-format) like to be able to hide all options that are
22682277// / not specific to the tool. This function allows a tool to specify a single
22692278// / option category to display in the -help output.
2270- LLVM_ABI void HideUnrelatedOptions (ArrayRef<const cl::OptionCategory *> Categories,
2271- SubCommand &Sub = SubCommand::getTopLevel());
2279+ LLVM_ABI void
2280+ HideUnrelatedOptions (ArrayRef<const cl::OptionCategory *> Categories,
2281+ SubCommand &Sub = SubCommand::getTopLevel());
22722282
22732283// / Reset all command line options to a state that looks as if they have
22742284// / never appeared on the command line. This is useful for being able to parse
0 commit comments