[llvm] r185746 - [objc-arc] Performed some small cleanups in ARCRuntimeEntryPoints and added an llvm_unreachable after the switch to quiet -Wreturn_type errors.

Michael Gottesman mgottesman at apple.com
Fri Jul 5 19:18:56 PDT 2013


Author: mgottesman
Date: Fri Jul  5 21:18:56 2013
New Revision: 185746

URL: http://llvm.org/viewvc/llvm-project?rev=185746&view=rev
Log:
[objc-arc] Performed some small cleanups in ARCRuntimeEntryPoints and added an llvm_unreachable after the switch to quiet -Wreturn_type errors.

Modified:
    llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h

Modified: llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h?rev=185746&r1=185745&r2=185746&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h Fri Jul  5 21:18:56 2013
@@ -77,16 +77,18 @@ public:
       return getI8XRetI8XEntryPoint(Autorelease, "objc_autorelease", true);
     case EPT_StoreStrong:
       return getI8XRetI8XXI8XEntryPoint(StoreStrong, "objc_storeStrong");
+    case EPT_RetainRV:
+      return getI8XRetI8XEntryPoint(RetainRV,
+                                    "objc_retainAutoreleasedReturnValue", true);
     case EPT_RetainAutorelease:
       return getI8XRetI8XEntryPoint(RetainAutorelease, "objc_retainAutorelease",
                                     true);
     case EPT_RetainAutoreleaseRV:
       return getI8XRetI8XEntryPoint(RetainAutoreleaseRV,
                                     "objc_retainAutoreleaseReturnValue", true);
-    case EPT_RetainRV:
-      return getI8XRetI8XEntryPoint(RetainRV,
-                                    "objc_retainAutoreleasedReturnValue", true);
     }
+
+    llvm_unreachable("Switch should be a covered switch.");
   }
 
 private:





More information about the llvm-commits mailing list