aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index e0cc9a7275..bf9244f282 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -341,8 +341,8 @@ void Driver::PrintHelp(bool ShowHidden) const {
// Render help text into (option, help) pairs.
std::vector< std::pair<std::string, const char*> > OptionHelp;
- for (unsigned i = options::OPT_INPUT, e = options::LastOption; i != e; ++i) {
- options::ID Id = (options::ID) i;
+ for (unsigned i = 0, e = getOpts().getNumOptions(); i != e; ++i) {
+ options::ID Id = (options::ID) (i + 1);
if (const char *Text = getOpts().getOptionHelpText(Id))
OptionHelp.push_back(std::make_pair(getOptionHelpName(getOpts(), Id),
Text));