[llvm] r364263 - [llvm-objcopy][NFCI] Fix build failure with GCC

Seiya Nuta via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 18:08:21 PDT 2019


Author: seiya
Date: Mon Jun 24 18:08:21 2019
New Revision: 364263

URL: http://llvm.org/viewvc/llvm-project?rev=364263&view=rev
Log:
[llvm-objcopy][NFCI] Fix build failure with GCC

Here is unreachable since the switch statement above is exhaustive.

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

Modified: llvm/trunk/tools/llvm-objcopy/llvm-objcopy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/llvm-objcopy.cpp?rev=364263&r1=364262&r2=364263&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/llvm-objcopy.cpp (original)
+++ llvm/trunk/tools/llvm-objcopy/llvm-objcopy.cpp Mon Jun 24 18:08:21 2019
@@ -150,6 +150,8 @@ static Error executeObjcopyOnRawBinary(c
   case FileFormat::Unspecified:
     return elf::executeObjcopyOnRawBinary(Config, In, Out);
   }
+
+  llvm_unreachable("unsupported output format");
 }
 
 /// The function executeObjcopyOnBinary does the dispatch based on the format




More information about the llvm-commits mailing list