summaryrefslogtreecommitdiff
path: root/include/llvm/PassSupport.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/PassSupport.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/PassSupport.h')
-rw-r--r--include/llvm/PassSupport.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index b018351338..4bbafdb855 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -22,6 +22,7 @@
#define LLVM_PASS_SUPPORT_H
#include "Pass.h"
+#include "llvm/PassRegistry.h"
namespace llvm {
@@ -57,7 +58,7 @@ public:
: PassName(name), PassArgument(arg), PassID(pi),
IsCFGOnlyPass(isCFGOnly),
IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) {
- registerPass();
+ PassRegistry::getPassRegistry()->registerPass(*this);
}
/// PassInfo ctor - Do not call this directly, this should only be invoked
/// through RegisterPass. This version is for use by analysis groups; it
@@ -126,10 +127,6 @@ public:
return ItfImpl;
}
-protected:
- void registerPass();
- void unregisterPass();
-
private:
void operator=(const PassInfo &); // do not implement
PassInfo(const PassInfo &); // do not implement
@@ -165,6 +162,7 @@ struct RegisterPass : public PassInfo {
: PassInfo(Name, PassArg, intptr_t(&passName::ID),
PassInfo::NormalCtor_t(callDefaultCtor<passName>),
CFGOnly, is_analysis) {
+
}
};