Add missing break statements, fixing PR3503.
authorChris Lattner <sabre@nondot.org>
Sat, 7 Feb 2009 22:37:06 +0000 (22:37 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 7 Feb 2009 22:37:06 +0000 (22:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64040 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/IntrinsicLowering.cpp

index e893a06699c33ab6c85f3448876f87cd7f37011f..5b4de27b8a9db6ca2ad17016329d0788cbc2faa3 100644 (file)
@@ -34,22 +34,25 @@ static void EnsureFunctionExists(Module &M, const char *Name,
   M.getOrInsertFunction(Name, FunctionType::get(RetTy, ParamTys, false));
 }
 
-static void EnsureFPIntrinsicsExist(Module &M, Module::iterator I,
-                                 const char *FName,
-                                 const char *DName, const char *LDName) {
+static void EnsureFPIntrinsicsExist(Module &M, Function *Fn,
+                                    const char *FName,
+                                    const char *DName, const char *LDName) {
   // 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:
-    EnsureFunctionExists(M, FName, I->arg_begin(), I->arg_end(),
+    EnsureFunctionExists(M, FName, Fn->arg_begin(), Fn->arg_end(),
                          Type::FloatTy);
+    break;
   case Type::DoubleTyID:
-    EnsureFunctionExists(M, DName, I->arg_begin(), I->arg_end(),
+    EnsureFunctionExists(M, DName, Fn->arg_begin(), Fn->arg_end(),
                          Type::DoubleTy);
+    break;
   case Type::X86_FP80TyID:
   case Type::FP128TyID:
   case Type::PPC_FP128TyID:
-    EnsureFunctionExists(M, LDName, I->arg_begin(), I->arg_end(),
-                         I->arg_begin()->getType());
+    EnsureFunctionExists(M, LDName, Fn->arg_begin(), Fn->arg_end(),
+                         Fn->arg_begin()->getType());
+    break;
   }
 }