summaryrefslogtreecommitdiff
path: root/include/llvm/PassSupport.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-10-07 04:13:08 +0000
committerOwen Anderson <resistor@mac.com>2010-10-07 04:13:08 +0000
commit71802344fcb224a89e4e636c1ec47f3730969be7 (patch)
treedd6cb671c0f1fb2cfa5cc92900291995616b1c01 /include/llvm/PassSupport.h
parent5a50ceeaea980962c1982ad535226c7ab06c971c (diff)
downloadllvm-71802344fcb224a89e4e636c1ec47f3730969be7.tar.gz
llvm-71802344fcb224a89e4e636c1ec47f3730969be7.tar.bz2
llvm-71802344fcb224a89e4e636c1ec47f3730969be7.tar.xz
Move the pass initialization helper functions into the llvm namespace, and add
a header declaring them all. This is also where we will declare per-library pass-set initializer functions down the road. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassSupport.h')
-rw-r--r--include/llvm/PassSupport.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index 2c17ddd217..4c630105bb 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -23,6 +23,7 @@
#include "Pass.h"
#include "llvm/PassRegistry.h"
+#include "llvm/InitializePasses.h"
#include <vector>
namespace llvm {
@@ -128,7 +129,7 @@ private:
};
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \
- void initialize##passName##Pass(PassRegistry &Registry) { \
+ void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI); \
@@ -211,14 +212,14 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
};
#define INITIALIZE_ANALYSIS_GROUP(agName, name) \
- void initialize##agName##AnalysisGroup(PassRegistry &Registry) { \
+ void llvm::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) { \
+ void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI); \