aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/PassSupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/PassSupport.h')
-rw-r--r--include/llvm/PassSupport.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index 449bc92..6cb6516 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -82,6 +82,15 @@ class TargetMachine;
CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
}
+#define INITIALIZE_PASS_WITH_OPTIONS(PassName, Arg, Name, Cfg, Analysis) \
+ INITIALIZE_PASS_BEGIN(PassName, Arg, Name, Cfg, Analysis) \
+ PassName::registerOptions(); \
+ INITIALIZE_PASS_END(PassName, Arg, Name, Cfg, Analysis)
+
+#define INITIALIZE_PASS_WITH_OPTIONS_BEGIN(PassName, Arg, Name, Cfg, Analysis) \
+ INITIALIZE_PASS_BEGIN(PassName, Arg, Name, Cfg, Analysis) \
+ PassName::registerOptions(); \
+
template<typename PassName>
Pass *callDefaultCtor() { return new PassName(); }