Add missing break statements, fixing PR3503.

llvm-svn: 64040
This commit is contained in:
Chris Lattner 2009-02-07 22:37:06 +00:00
parent 79f955bfed
commit d8f0786c31
1 changed files with 11 additions and 8 deletions

View File

@ -34,22 +34,25 @@ static void EnsureFunctionExists(Module &M, const char *Name,
M.getOrInsertFunction(Name, FunctionType::get(RetTy, ParamTys, false)); M.getOrInsertFunction(Name, FunctionType::get(RetTy, ParamTys, false));
} }
static void EnsureFPIntrinsicsExist(Module &M, Module::iterator I, static void EnsureFPIntrinsicsExist(Module &M, Function *Fn,
const char *FName, const char *FName,
const char *DName, const char *LDName) { const char *DName, const char *LDName) {
// Insert definitions for all the floating point types. // Insert definitions for all the floating point types.
switch((int)I->arg_begin()->getType()->getTypeID()) { switch((int)Fn->arg_begin()->getType()->getTypeID()) {
case Type::FloatTyID: case Type::FloatTyID:
EnsureFunctionExists(M, FName, I->arg_begin(), I->arg_end(), EnsureFunctionExists(M, FName, Fn->arg_begin(), Fn->arg_end(),
Type::FloatTy); Type::FloatTy);
break;
case Type::DoubleTyID: case Type::DoubleTyID:
EnsureFunctionExists(M, DName, I->arg_begin(), I->arg_end(), EnsureFunctionExists(M, DName, Fn->arg_begin(), Fn->arg_end(),
Type::DoubleTy); Type::DoubleTy);
break;
case Type::X86_FP80TyID: case Type::X86_FP80TyID:
case Type::FP128TyID: case Type::FP128TyID:
case Type::PPC_FP128TyID: case Type::PPC_FP128TyID:
EnsureFunctionExists(M, LDName, I->arg_begin(), I->arg_end(), EnsureFunctionExists(M, LDName, Fn->arg_begin(), Fn->arg_end(),
I->arg_begin()->getType()); Fn->arg_begin()->getType());
break;
} }
} }