diff options
author | Owen Anderson <resistor@mac.com> | 2010-10-06 21:02:27 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-10-06 21:02:27 +0000 |
commit | e9ef41a47d2ee637b6aed5d018c4d90019d987ac (patch) | |
tree | c35cbecfcd21bfb9f4b7e55b94a560b2db071823 /include | |
parent | d6747df5e0354256a9e440d38f21c0b3ca82af28 (diff) | |
download | llvm-e9ef41a47d2ee637b6aed5d018c4d90019d987ac.tar.gz llvm-e9ef41a47d2ee637b6aed5d018c4d90019d987ac.tar.bz2 llvm-e9ef41a47d2ee637b6aed5d018c4d90019d987ac.tar.xz |
Hide analysis group registration behind a macro, just like pass registration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/PassSupport.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h index ac61eb6a07..2c17ddd217 100644 --- a/include/llvm/PassSupport.h +++ b/include/llvm/PassSupport.h @@ -210,6 +210,13 @@ struct RegisterAnalysisGroup : public RegisterAGBase { } }; +#define INITIALIZE_ANALYSIS_GROUP(agName, name) \ + void initialize##agName##AnalysisGroup(PassRegistry &Registry) { \ + PassInfo *AI = new PassInfo(name, & agName :: ID); \ + Registry.registerAnalysisGroup(& agName ::ID, 0, *AI, false); \ + } \ + static RegisterAnalysisGroup<agName> agName##_info (name) + #define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \ void initialize##passName##Pass(PassRegistry &Registry) { \ PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \ |