MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
[oota-llvm.git] / include / llvm / Support / Registry.h
index 5a7d7fa65e30d351060a5b183338eda91011b040..4db88825afb55b96fdbe43779352423f0a5b13ea 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef LLVM_SUPPORT_REGISTRY_H
 #define LLVM_SUPPORT_REGISTRY_H
 
-#include "llvm/Support/CommandLine.h"
-
 namespace llvm {
   /// A simple registry entry which provides only a name, description, and
   /// no-argument constructor.
@@ -79,9 +77,6 @@ namespace llvm {
     static listener *ListenerHead, *ListenerTail;
 
   public:
-    class iterator;
-
-
     /// Node in linked list of entries.
     ///
     class node {
@@ -204,33 +199,7 @@ namespace llvm {
         : Entry(Name, Desc, CtorFn), Node(Entry) {}
     };
 
-
-    /// A command-line parser for a registry. Use like such:
-    ///
-    ///   static cl::opt<Registry<Collector>::entry, false,
-    ///                  Registry<Collector>::Parser>
-    ///   GCOpt("gc", cl::desc("Garbage collector to use."),
-    ///               cl::value_desc());
-    ///
-    /// To make use of the value:
-    ///
-    ///   Collector *TheCollector = GCOpt->instantiate();
-    ///
-    class Parser : public cl::parser<const typename U::entry*>, public listener{
-      typedef U traits;
-      typedef typename U::entry entry;
-
-    protected:
-      void registered(const entry &E) {
-        addLiteralOption(traits::nameof(E), &E, traits::descof(E));
-      }
-
-    public:
-      void initialize(cl::Option &O) {
-        listener::init();
-        cl::parser<const typename U::entry*>::initialize(O);
-      }
-    };
+    /// Registry::Parser now lives in llvm/Support/RegistryParser.h.
 
   };