]> granicus.if.org Git - llvm/commitdiff
Move llvm_unreachable out of switch.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Feb 2017 19:42:14 +0000 (19:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Feb 2017 19:42:14 +0000 (19:42 +0000)
This should make gcc happy and still produce a clang warning if we add
another value to the enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295865 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/ArchiveWriter.cpp

index 11cd72fa69d44f90d6157db07ca8104a184273e6..83fbf2f585464f5564795baf0557a6fdf31b42db 100644 (file)
@@ -129,9 +129,12 @@ static bool isBSDLike(object::Archive::Kind Kind) {
   case object::Archive::K_BSD:
   case object::Archive::K_DARWIN:
     return true;
-  default:
-    llvm_unreachable("not supported for writting");
+  case object::Archive::K_MIPS64:
+  case object::Archive::K_DARWIN64:
+  case object::Archive::K_COFF:
+    break;
   }
+  llvm_unreachable("not supported for writting");
 }
 
 static void print32(raw_ostream &Out, object::Archive::Kind Kind,