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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index d985bf1..bc2b7da 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -226,7 +226,8 @@ struct RegisterOpt : public RegisterPassBase {
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();
}
@@ -246,7 +247,7 @@ struct RegisterOpt : public RegisterPassBase {
bool CFGOnly = false) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName),
PassInfo::Optimization, 0,
- (Pass*(*)(TargetMachine&))targetctor));
+ static_cast<Pass*(*)(TargetMachine&)>(targetctor)));
if (CFGOnly) setOnlyUsesCFG();
}
};