summaryrefslogtreecommitdiff
path: root/include/llvm/PassRegistry.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-20 23:41:56 +0000
committerOwen Anderson <resistor@mac.com>2010-07-20 23:41:56 +0000
commit539673579ec79b75a95ef9daefc6a8b2fc8552f5 (patch)
treec4f78678bea14baa763cce7dd1a2fad6140b7fe0 /include/llvm/PassRegistry.h
parent1154f426d72ea7b2d9de93f9af5874d7d9b5a3d5 (diff)
downloadllvm-539673579ec79b75a95ef9daefc6a8b2fc8552f5.tar.gz
llvm-539673579ec79b75a95ef9daefc6a8b2fc8552f5.tar.bz2
llvm-539673579ec79b75a95ef9daefc6a8b2fc8552f5.tar.xz
Move the handling of PassRegistrationListener's to PassRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassRegistry.h')
-rw-r--r--include/llvm/PassRegistry.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/PassRegistry.h b/include/llvm/PassRegistry.h
index 1f627d8bfc..7b1b6fc703 100644
--- a/include/llvm/PassRegistry.h
+++ b/include/llvm/PassRegistry.h
@@ -17,17 +17,18 @@
#ifndef LLVM_PASSREGISTRY_H
#define LLVM_PASSREGISTRY_H
-#include "llvm/PassSupport.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/System/DataTypes.h"
#include "llvm/System/Mutex.h"
#include <map>
#include <set>
-
-using namespace llvm;
+#include <vector>
namespace llvm {
+class PassInfo;
+struct PassRegistrationListener;
+
class PassRegistry {
/// Guards the contents of this class.
mutable sys::SmartMutex<true> Lock;
@@ -44,6 +45,8 @@ class PassRegistry {
std::set<const PassInfo *> Implementations;
};
std::map<const PassInfo*, AnalysisGroupInfo> AnalysisGroupInfoMap;
+
+ std::vector<PassRegistrationListener*> Listeners;
public:
static PassRegistry *getPassRegistry();
@@ -60,6 +63,8 @@ public:
bool isDefault);
void enumerateWith(PassRegistrationListener *L);
+ void addRegistrationListener(PassRegistrationListener* L);
+ void removeRegistrationListener(PassRegistrationListener *L);
};
}