diff --git a/include/llvm/Support/Registry.h b/include/llvm/Support/Registry.h index d89425664ab..c9fb0a1d3e4 100644 --- a/include/llvm/Support/Registry.h +++ b/include/llvm/Support/Registry.h @@ -44,8 +44,8 @@ namespace llvm { public: typedef SimpleRegistryEntry entry; - /// Accessors for . - /// + /// nameof/descof - Accessors for name and description of entries. These are + // used to generate help for command-line options. static const char *nameof(const entry &Entry) { return Entry.getName(); } static const char *descof(const entry &Entry) { return Entry.getDesc(); } }; @@ -234,6 +234,19 @@ namespace llvm { }; + + template + typename Registry::node *Registry::Head; + + template + typename Registry::node *Registry::Tail; + + template + typename Registry::listener *Registry::ListenerHead; + + template + typename Registry::listener *Registry::ListenerTail; + } #endif diff --git a/lib/CodeGen/GCMetadataPrinter.cpp b/lib/CodeGen/GCMetadataPrinter.cpp index 07ec0bd0359..496450325b3 100644 --- a/lib/CodeGen/GCMetadataPrinter.cpp +++ b/lib/CodeGen/GCMetadataPrinter.cpp @@ -15,17 +15,6 @@ using namespace llvm; -// ----------------------------------------------------------------------------- - -template<> GCMetadataPrinterRegistry::node *GCMetadataPrinterRegistry::Head = 0; -template<> GCMetadataPrinterRegistry::node *GCMetadataPrinterRegistry::Tail = 0; -template<> GCMetadataPrinterRegistry::listener * -GCMetadataPrinterRegistry::ListenerHead = 0; -template<> GCMetadataPrinterRegistry::listener * -GCMetadataPrinterRegistry::ListenerTail = 0; - -// ----------------------------------------------------------------------------- - GCMetadataPrinter::GCMetadataPrinter() { } GCMetadataPrinter::~GCMetadataPrinter() { } diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp index 26667759964..6ca368240d2 100644 --- a/lib/CodeGen/GCStrategy.cpp +++ b/lib/CodeGen/GCStrategy.cpp @@ -88,13 +88,6 @@ namespace { // ----------------------------------------------------------------------------- -template<> GCRegistry::node *GCRegistry::Head = 0; -template<> GCRegistry::node *GCRegistry::Tail = 0; -template<> GCRegistry::listener *GCRegistry::ListenerHead = 0; -template<> GCRegistry::listener *GCRegistry::ListenerTail = 0; - -// ----------------------------------------------------------------------------- - GCStrategy::GCStrategy() : NeededSafePoints(0), CustomReadBarriers(false), diff --git a/lib/Target/TargetMachineRegistry.cpp b/lib/Target/TargetMachineRegistry.cpp index 72e5401422c..c1a4777c631 100644 --- a/lib/Target/TargetMachineRegistry.cpp +++ b/lib/Target/TargetMachineRegistry.cpp @@ -18,13 +18,6 @@ #include using namespace llvm; -template<> Registry::node *Registry::Head = 0; -template<> Registry::node *Registry::Tail = 0; -template<> Registry::listener *Registry:: -ListenerHead = 0; -template<> Registry::listener *Registry:: -ListenerTail = 0; - /// getClosestStaticTargetForModule - Given an LLVM module, pick the best target /// that is compatible with the module. If no close target can be found, this /// returns null and sets the Error string to a reason.