mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
NFC. Making printOptionValues an API on the parser class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d9b3a8244a
commit
2048ee38ab
@ -186,6 +186,8 @@ public:
|
||||
}
|
||||
OptionsMap.erase(StringRef(O->ArgStr));
|
||||
}
|
||||
|
||||
void printOptionValues();
|
||||
};
|
||||
|
||||
static ManagedStatic<CommandLineParser> GlobalParser;
|
||||
@ -1725,12 +1727,14 @@ void HelpPrinterWrapper::operator=(bool Value) {
|
||||
}
|
||||
|
||||
// Print the value of each option.
|
||||
void cl::PrintOptionValues() {
|
||||
void cl::PrintOptionValues() { GlobalParser->printOptionValues(); }
|
||||
|
||||
void CommandLineParser::printOptionValues() {
|
||||
if (!PrintOptions && !PrintAllOptions)
|
||||
return;
|
||||
|
||||
SmallVector<std::pair<const char *, Option *>, 128> Opts;
|
||||
sortOpts(GlobalParser->OptionsMap, Opts, /*ShowHidden*/ true);
|
||||
sortOpts(OptionsMap, Opts, /*ShowHidden*/ true);
|
||||
|
||||
// Compute the maximum argument length...
|
||||
size_t MaxArgLen = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user