Fix more warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-06-04 20:39:05 +00:00
parent fb04197c01
commit 43714d11ea

View File

@ -174,19 +174,19 @@ template<typename PassName>
struct RegisterPass : public RegisterPassBase { struct RegisterPass : public RegisterPassBase {
// Register Pass using default constructor... // Register Pass using default constructor...
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy = 0) { RegisterPass(const char *PassArg, const char *Name, unsigned char PassTy = 0){
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy,
callDefaultCtor<PassName>)); callDefaultCtor<PassName>));
} }
// Register Pass using default constructor explicitly... // Register Pass using default constructor explicitly...
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy, RegisterPass(const char *PassArg, const char *Name, unsigned char PassTy,
Pass *(*ctor)()) { Pass *(*ctor)()) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, ctor)); registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, ctor));
} }
// Register Pass using TargetMachine constructor... // Register Pass using TargetMachine constructor...
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy, RegisterPass(const char *PassArg, const char *Name, unsigned char PassTy,
Pass *(*targetctor)(TargetMachine &)) { Pass *(*targetctor)(TargetMachine &)) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy,
0, targetctor)); 0, targetctor));
@ -194,7 +194,7 @@ struct RegisterPass : public RegisterPassBase {
// Generic constructor version that has an unknown ctor type... // Generic constructor version that has an unknown ctor type...
template<typename CtorType> template<typename CtorType>
RegisterPass(const char *PassArg, const char *Name, unsigned PassTy, RegisterPass(const char *PassArg, const char *Name, unsigned char PassTy,
CtorType *Fn) { CtorType *Fn) {
registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, 0)); registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassTy, 0));
} }