aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-19 04:25:22 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-19 04:25:22 +0000
commit265e9ef9f3ef30a97790e6e7bbc3c17d97981ca7 (patch)
tree8f1d8731de0fe2100a5156fe2d3477388f160057
parenta0289fda5b5d67ad49596a5e1f62e1f9db497d06 (diff)
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
-rw-r--r--include/clang/Driver/ArgList.h1
-rw-r--r--lib/Driver/Compilation.cpp1
-rw-r--r--lib/Driver/Driver.cpp4
-rw-r--r--lib/Driver/ToolChains.cpp1
-rw-r--r--lib/Driver/Tools.cpp1
-rw-r--r--tools/driver/driver.cpp1
6 files changed, 5 insertions, 4 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index 281a89b448..5263108d1a 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 c12f5aa881..ffa627ad28 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 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));
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index a9a2d0fbc3..af639523f1 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 15e5f3fffd..e7dcc20883 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 fb7c6cc7b0..43dd36963c 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"