diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-04 21:17:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-04 21:17:31 +0000 |
commit | 3e894bc92c3f7e6eaaa49c2ea3871be8ee43a100 (patch) | |
tree | 8f2e87fe0d0d8946d8228e845070398ee901373b | |
parent | eec991a7041ce0142dc326c3ebe627119e3cae2e (diff) |
Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66071 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/Arg.h | 3 | ||||
-rw-r--r-- | include/clang/Driver/ArgList.h | 13 |
2 files changed, 1 insertions, 15 deletions
diff --git a/include/clang/Driver/Arg.h b/include/clang/Driver/Arg.h index 317af97ea5..8d8f0942a0 100644 --- a/include/clang/Driver/Arg.h +++ b/include/clang/Driver/Arg.h @@ -11,7 +11,6 @@ #define CLANG_DRIVER_ARG_H_ #include "Util.h" -#include "llvm/ADT/ilist_node.h" namespace clang { namespace driver { @@ -25,7 +24,7 @@ namespace driver { /// instances have an intrusive double linked list which is used by /// ArgList to provide efficient iteration over all instances of a /// particular option. - class Arg : public llvm::ilist_node<Arg> { + class Arg { private: enum ArgClass { PositionalArg = 0, diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h index 52d4a19f79..9eefa8a127 100644 --- a/include/clang/Driver/ArgList.h +++ b/include/clang/Driver/ArgList.h @@ -11,7 +11,6 @@ #define CLANG_DRIVER_ARGLIST_H_ #include "Util.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" namespace clang { @@ -37,11 +36,6 @@ namespace driver { /// The full list of arguments. arglist_type Args; - /// A map of arguments by option ID; in conjunction with the - /// intrusive list in Arg instances this allows iterating over all - /// arguments for a particular option. - llvm::DenseMap<unsigned, Arg*> ArgMap; - public: ArgList(const char **ArgBegin, const char **ArgEnd); ArgList(const ArgList &); @@ -54,13 +48,6 @@ namespace driver { const_iterator begin() const { return Args.begin(); } const_iterator end() const { return Args.end(); } - - Arg *getArgForID(unsigned ID) const { - llvm::DenseMap<unsigned, Arg*>::iterator it = ArgMap.find(ID); - if (it != ArgMap.end()) - return it->second; - return 0; - } }; } // end namespace driver } // end namespace clang |