Remove an unused member variable from HelpPrinter. Move another member variable to be a local variable in the only method that uses it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2013-03-09 23:29:37 +00:00
parent f793de7a23
commit ddde2082db

View File

@ -1222,14 +1222,10 @@ sortOpts(StringMap<Option*> &OptMap,
namespace {
class HelpPrinter {
size_t MaxArgLen;
const Option *EmptyArg;
const bool ShowHidden;
public:
explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {
EmptyArg = 0;
}
explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {}
void operator=(bool Value) {
if (Value == false) return;
@ -1266,7 +1262,7 @@ public:
outs() << "\n\n";
// Compute the maximum argument length...
MaxArgLen = 0;
size_t MaxArgLen = 0;
for (size_t i = 0, e = Opts.size(); i != e; ++i)
MaxArgLen = std::max(MaxArgLen, Opts[i].second->getOptionWidth());