[llvm] r207609 - ARM: move llvm_unreachable use

Saleem Abdulrasool compnerd at compnerd.org
Tue Apr 29 22:12:42 PDT 2014


Author: compnerd
Date: Wed Apr 30 00:12:41 2014
New Revision: 207609

URL: http://llvm.org/viewvc/llvm-project?rev=207609&view=rev
Log:
ARM: move llvm_unreachable use

When building with -Werror=covered-switch-default (as on the buildbots), the
build would fail since all cases are covered by the switch.  Move the
llvm_unreachable to the end of the function as an annotation.

Modified:
    llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=207609&r1=207608&r2=207609&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Wed Apr 30 00:12:41 2014
@@ -620,7 +620,6 @@ static bool IsAnAddressOperand(const Mac
   // operand is not a symbol reference, we return that it is a symbol reference.
   // This is important as the load pair may not be split up Windows.
   switch (MO.getType()) {
-  default: llvm_unreachable("unhandled machine operand type");
   case MachineOperand::MO_Register:
   case MachineOperand::MO_Immediate:
   case MachineOperand::MO_CImmediate:
@@ -646,6 +645,7 @@ static bool IsAnAddressOperand(const Mac
   case MachineOperand::MO_CFIIndex:
     return false;
   }
+  llvm_unreachable("unhandled machine operand type");
 }
 
 void ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &MBB,





More information about the llvm-commits mailing list