aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/PassSupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/PassSupport.h')
-rw-r--r--include/llvm/PassSupport.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index 5f8a1458c2..4921848aba 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -241,23 +241,15 @@ public:
~RegisterAGBase();
};
-
-template<typename Interface, typename DefaultImplementationPass = void,
- bool Default = false>
+template<typename Interface, bool Default = false>
struct RegisterAnalysisGroup : public RegisterAGBase {
- RegisterAnalysisGroup() : RegisterAGBase(typeid(Interface),
- &typeid(DefaultImplementationPass),
- Default) {
+ RegisterAnalysisGroup(RegisterPassBase &RPB)
+ : RegisterAGBase(typeid(Interface), &RPB.getPassInfo()->getTypeInfo(),
+ Default) {
}
-};
-/// Define a specialization of RegisterAnalysisGroup that is used to set the
-/// name for the analysis group.
-///
-template<typename Interface>
-struct RegisterAnalysisGroup<Interface, void, false> : public RegisterAGBase {
RegisterAnalysisGroup(const char *Name)
- : RegisterAGBase(typeid(Interface)) {
+ : RegisterAGBase(typeid(Interface)) {
setGroupName(Name);
}
};