Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit ddde208

Browse files
committed
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
1 parent f793de7 commit ddde208

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Support/CommandLine.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,14 +1222,10 @@ sortOpts(StringMap<Option*> &OptMap,
12221222
namespace {
12231223

12241224
class HelpPrinter {
1225-
size_t MaxArgLen;
1226-
const Option *EmptyArg;
12271225
const bool ShowHidden;
12281226

12291227
public:
1230-
explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {
1231-
EmptyArg = 0;
1232-
}
1228+
explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {}
12331229

12341230
void operator=(bool Value) {
12351231
if (Value == false) return;
@@ -1266,7 +1262,7 @@ class HelpPrinter {
12661262
outs() << "\n\n";
12671263

12681264
// Compute the maximum argument length...
1269-
MaxArgLen = 0;
1265+
size_t MaxArgLen = 0;
12701266
for (size_t i = 0, e = Opts.size(); i != e; ++i)
12711267
MaxArgLen = std::max(MaxArgLen, Opts[i].second->getOptionWidth());
12721268

0 commit comments

Comments
 (0)