[cfe-commits] r66071 - in /cfe/trunk/include/clang/Driver: Arg.h ArgList.h

Daniel Dunbar daniel at zuster.org
Wed Mar 4 13:17:31 PST 2009


Author: ddunbar
Date: Wed Mar  4 15:17:31 2009
New Revision: 66071

URL: http://llvm.org/viewvc/llvm-project?rev=66071&view=rev
Log:
Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...

Modified:
    cfe/trunk/include/clang/Driver/Arg.h
    cfe/trunk/include/clang/Driver/ArgList.h

Modified: cfe/trunk/include/clang/Driver/Arg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Arg.h?rev=66071&r1=66070&r2=66071&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Arg.h (original)
+++ cfe/trunk/include/clang/Driver/Arg.h Wed Mar  4 15:17:31 2009
@@ -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 @@
   /// 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,

Modified: cfe/trunk/include/clang/Driver/ArgList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ArgList.h?rev=66071&r1=66070&r2=66071&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/ArgList.h (original)
+++ cfe/trunk/include/clang/Driver/ArgList.h Wed Mar  4 15:17:31 2009
@@ -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 @@
     /// 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 @@
 
     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





More information about the cfe-commits mailing list