eliminate RegisterOpt. It does the same thing as RegisterPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-08-27 22:42:52 +00:00
parent 21a82e6fc7
commit 7f8897f22e
76 changed files with 107 additions and 149 deletions

View File

@@ -208,53 +208,6 @@ struct RegisterPass : public RegisterPassBase {
}
};
/// RegisterOpt - Register something that is to show up in Opt, this is just a
/// shortcut for specifying RegisterPass...
///
template<typename PassName>
struct RegisterOpt : public RegisterPassBase {
RegisterOpt(const char *PassArg, const char *Name, bool CFGOnly = false)
: RegisterPassBase(Name, PassArg, typeid(PassName),
callDefaultCtor<PassName>) {
if (CFGOnly) setOnlyUsesCFG();
}
/// Register Pass using default constructor explicitly...
///
RegisterOpt(const char *PassArg, const char *Name, Pass *(*ctor)(),
bool CFGOnly = false)
: RegisterPassBase(Name, PassArg, typeid(PassName), ctor) {
if (CFGOnly) setOnlyUsesCFG();
}
/// Register FunctionPass using default constructor explicitly...
///
RegisterOpt(const char *PassArg, const char *Name, FunctionPass *(*ctor)(),
bool CFGOnly = false)
: RegisterPassBase(Name, PassArg, typeid(PassName),
static_cast<Pass*(*)()>(ctor)) {
if (CFGOnly) setOnlyUsesCFG();
}
/// Register Pass using TargetMachine constructor...
///
RegisterOpt(const char *PassArg, const char *Name,
Pass *(*targetctor)(TargetMachine &), bool CFGOnly = false)
: RegisterPassBase(Name, PassArg, typeid(PassName), 0, targetctor) {
if (CFGOnly) setOnlyUsesCFG();
}
/// Register FunctionPass using TargetMachine constructor...
///
RegisterOpt(const char *PassArg, const char *Name,
FunctionPass *(*targetctor)(TargetMachine &),
bool CFGOnly = false)
: RegisterPassBase(Name, PassArg, typeid(PassName), 0,
static_cast<Pass*(*)(TargetMachine&)>(targetctor)) {
if (CFGOnly) setOnlyUsesCFG();
}
};
/// RegisterAnalysisGroup - Register a Pass as a member of an analysis _group_.
/// Analysis groups are used to define an interface (which need not derive from