summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-03-09 23:29:37 +0000
committerCraig Topper <craig.topper@gmail.com>2013-03-09 23:29:37 +0000
commitfa9888fce7fae6d271166ddbeea6ae6e5167cf16 (patch)
treea137cf282d3ac898f3dbacf73a8560edf6d5291c /llvm/lib/Support/CommandLine.cpp
parentbe3d97114354de0679acb63b964b2aaf06023ad1 (diff)
downloadbcm5719-llvm-fa9888fce7fae6d271166ddbeea6ae6e5167cf16.tar.gz
bcm5719-llvm-fa9888fce7fae6d271166ddbeea6ae6e5167cf16.zip
Remove an unused member variable from HelpPrinter. Move another member variable to be a local variable in the only method that uses it.
llvm-svn: 176778
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 53fcf06f828..560d7eb289c 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -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());
OpenPOWER on IntegriCloud