mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Pass initialization functions should take a PassRegistry as a parameter
rather than being fixed to the global registry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
153666c038
commit
5f0d700278
@ -128,10 +128,10 @@ private:
|
||||
};
|
||||
|
||||
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \
|
||||
void initialize##passName##Pass() { \
|
||||
void initialize##passName##Pass(PassRegistry &Registry) { \
|
||||
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
|
||||
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
|
||||
PassRegistry::getPassRegistry()->registerPass(*PI); \
|
||||
Registry.registerPass(*PI); \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis)
|
||||
|
||||
@ -211,14 +211,13 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
|
||||
};
|
||||
|
||||
#define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \
|
||||
void initialize##passName##Pass() { \
|
||||
void initialize##passName##Pass(PassRegistry &Registry) { \
|
||||
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
|
||||
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
|
||||
PassRegistry::getPassRegistry()->registerPass(*PI); \
|
||||
Registry.registerPass(*PI); \
|
||||
\
|
||||
PassInfo *AI = new PassInfo(name, & agName :: ID); \
|
||||
PassRegistry::getPassRegistry()->registerAnalysisGroup( \
|
||||
& agName ::ID, & passName ::ID, *AI, def); \
|
||||
Registry.registerAnalysisGroup(& agName ::ID, & passName ::ID, *AI, def); \
|
||||
} \
|
||||
static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis); \
|
||||
static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user