RegisterOpt(const char *PassArg, const char *Name, FunctionPass *(*ctor)(),
bool CFGOnly = false) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
- PassInfo::Optimization, (Pass*(*)())ctor));
+ PassInfo::Optimization,
+ static_cast<Pass*(*)()>(ctor)));
if (CFGOnly) setOnlyUsesCFG();
}
bool CFGOnly = false) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
PassInfo::Optimization, 0,
- (Pass*(*)(TargetMachine&))targetctor));
+ static_cast<Pass*(*)(TargetMachine&)>(targetctor)));
if (CFGOnly) setOnlyUsesCFG();
}
};