summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Registry.h
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-08-17 19:08:34 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-08-17 19:08:34 +0000
commit8715367182244e784b9f5688baf1ed607768e687 (patch)
tree7fb68b3ef39542a0d78e3183390a3ba429f3e633 /include/llvm/Support/Registry.h
parenta08f5186b0687d1110af5d669a84d59e6413aa68 (diff)
downloadllvm-8715367182244e784b9f5688baf1ed607768e687.tar.gz
llvm-8715367182244e784b9f5688baf1ed607768e687.tar.bz2
llvm-8715367182244e784b9f5688baf1ed607768e687.tar.xz
Don't require Registry specializations to define random static variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Registry.h')
-rw-r--r--include/llvm/Support/Registry.h17
1 files changed, 15 insertions, 2 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