aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/Registry.h17
-rw-r--r--lib/CodeGen/GCMetadataPrinter.cpp11
-rw-r--r--lib/CodeGen/GCStrategy.cpp7
-rw-r--r--lib/Target/TargetMachineRegistry.cpp7
4 files changed, 15 insertions, 27 deletions
diff --git a/include/llvm/Support/Registry.h b/include/llvm/Support/Registry.h
index d89425664a..c9fb0a1d3e 100644
--- a/include/llvm/Support/Registry.h
+++ b/include/llvm/Support/Registry.h
@@ -44,8 +44,8 @@ namespace llvm {
public:
typedef SimpleRegistryEntry<T> 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 T, typename U>
+ typename Registry<T,U>::node *Registry<T,U>::Head;
+
+ template <typename T, typename U>
+ typename Registry<T,U>::node *Registry<T,U>::Tail;
+
+ template <typename T, typename U>
+ typename Registry<T,U>::listener *Registry<T,U>::ListenerHead;
+
+ template <typename T, typename U>
+ typename Registry<T,U>::listener *Registry<T,U>::ListenerTail;
+
}
#endif
diff --git a/lib/CodeGen/GCMetadataPrinter.cpp b/lib/CodeGen/GCMetadataPrinter.cpp
index 07ec0bd035..496450325b 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 2666775996..6ca368240d 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 72e5401422..c1a4777c63 100644
--- a/lib/Target/TargetMachineRegistry.cpp
+++ b/lib/Target/TargetMachineRegistry.cpp
@@ -18,13 +18,6 @@
#include <algorithm>
using namespace llvm;
-template<> Registry<TargetMachine>::node *Registry<TargetMachine>::Head = 0;
-template<> Registry<TargetMachine>::node *Registry<TargetMachine>::Tail = 0;
-template<> Registry<TargetMachine>::listener *Registry<TargetMachine>::
-ListenerHead = 0;
-template<> Registry<TargetMachine>::listener *Registry<TargetMachine>::
-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.