aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Registry.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch)
treea6140557876943cdd800ee997c9317283394b22c /include/llvm/Support/Registry.h
parentf03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff)
Diffstat (limited to 'include/llvm/Support/Registry.h')
-rw-r--r--include/llvm/Support/Registry.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Support/Registry.h b/include/llvm/Support/Registry.h
index e21269b2f1d5..95c4e96f7f29 100644
--- a/include/llvm/Support/Registry.h
+++ b/include/llvm/Support/Registry.h
@@ -14,6 +14,7 @@
#ifndef LLVM_SUPPORT_REGISTRY_H
#define LLVM_SUPPORT_REGISTRY_H
+#include "llvm/ADT/iterator_range.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Compiler.h"
#include <memory>
@@ -41,7 +42,7 @@ namespace llvm {
/// is necessary to define an alternate traits class.
template <typename T>
class RegistryTraits {
- RegistryTraits() LLVM_DELETED_FUNCTION;
+ RegistryTraits() = delete;
public:
typedef SimpleRegistryEntry<T> entry;
@@ -67,7 +68,7 @@ namespace llvm {
class iterator;
private:
- Registry() LLVM_DELETED_FUNCTION;
+ Registry() = delete;
static void Announce(const entry &E) {
for (listener *Cur = ListenerHead; Cur; Cur = Cur->Next)
@@ -120,6 +121,10 @@ namespace llvm {
static iterator begin() { return iterator(Head); }
static iterator end() { return iterator(nullptr); }
+ static iterator_range<iterator> entries() {
+ return iterator_range<iterator>(begin(), end());
+ }
+
/// Abstract base class for registry listeners, which are informed when new
/// entries are added to the registry. Simply subclass and instantiate: