[llvm-commits] CVS: llvm/include/llvm/PassSupport.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 27 17:42:49 PDT 2006
Changes in directory llvm/include/llvm:
PassSupport.h updated: 1.29 -> 1.30
---
Log message:
simplify AnalysisGroup registration, eliminating one typeid call.
---
Diffs of the changes: (+5 -13)
PassSupport.h | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
Index: llvm/include/llvm/PassSupport.h
diff -u llvm/include/llvm/PassSupport.h:1.29 llvm/include/llvm/PassSupport.h:1.30
--- llvm/include/llvm/PassSupport.h:1.29 Sun Aug 27 17:42:51 2006
+++ llvm/include/llvm/PassSupport.h Sun Aug 27 19:42:29 2006
@@ -241,23 +241,15 @@
~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);
}
};
More information about the llvm-commits
mailing list