From 539673579ec79b75a95ef9daefc6a8b2fc8552f5 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 20 Jul 2010 23:41:56 +0000 Subject: 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 --- include/llvm/PassRegistry.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/llvm/PassRegistry.h') 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 #include - -using namespace llvm; +#include namespace llvm { +class PassInfo; +struct PassRegistrationListener; + class PassRegistry { /// Guards the contents of this class. mutable sys::SmartMutex Lock; @@ -44,6 +45,8 @@ class PassRegistry { std::set Implementations; }; std::map AnalysisGroupInfoMap; + + std::vector Listeners; public: static PassRegistry *getPassRegistry(); @@ -60,6 +63,8 @@ public: bool isDefault); void enumerateWith(PassRegistrationListener *L); + void addRegistrationListener(PassRegistrationListener* L); + void removeRegistrationListener(PassRegistrationListener *L); }; } -- cgit v1.2.3