[llvm] r185751 - [llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.

Michael Gottesman mgottesman at apple.com
Fri Jul 5 19:39:51 PDT 2013


Author: mgottesman
Date: Fri Jul  5 21:39:51 2013
New Revision: 185751

URL: http://llvm.org/viewvc/llvm-project?rev=185751&view=rev
Log:
[llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.

Modified:
    llvm/trunk/tools/llvm-ar/llvm-ar.cpp

Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=185751&r1=185750&r2=185751&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Fri Jul  5 21:39:51 2013
@@ -655,6 +655,8 @@ bool shouldCreateArchive(ArchiveOperatio
   case ReplaceOrInsert:
     return true;
   }
+
+  llvm_unreachable("Missing entry in covered switch.");
 }
 
 // main - main program for llvm-ar .. see comments in the code





More information about the llvm-commits mailing list