Driver: ArgList doesn't depend on Options.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index 281a89b..5263108 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -11,7 +11,6 @@
 #define CLANG_DRIVER_ARGLIST_H_
 
 #include "clang/Driver/OptSpecifier.h"
-#include "clang/Driver/Options.h"
 #include "clang/Driver/Util.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index c12f5aa..ffa627a 100644
--- a/lib/Driver/Compilation.cpp
+++ b/lib/Driver/Compilation.cpp
@@ -13,6 +13,7 @@
 #include "clang/Driver/ArgList.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/DriverDiagnostic.h"
+#include "clang/Driver/Options.h"
 #include "clang/Driver/ToolChain.h"
 
 #include "llvm/Support/raw_ostream.h"
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index e0cc9a7..bf9244f 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -341,8 +341,8 @@
   // 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));
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index a9a2d0f..af63952 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -16,6 +16,7 @@
 #include "clang/Driver/HostInfo.h"
 #include "clang/Driver/OptTable.h"
 #include "clang/Driver/Option.h"
+#include "clang/Driver/Options.h"
 
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/ErrorHandling.h"
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 15e5f3f..e7dcc20 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -18,6 +18,7 @@
 #include "clang/Driver/Job.h"
 #include "clang/Driver/HostInfo.h"
 #include "clang/Driver/Option.h"
+#include "clang/Driver/Options.h"
 #include "clang/Driver/ToolChain.h"
 #include "clang/Driver/Util.h"
 
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index fb7c6cc..43dd369 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -15,7 +15,6 @@
 #include "clang/Driver/Compilation.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/Option.h"
-#include "clang/Driver/Options.h"
 
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/OwningPtr.h"