[llvm] r204318 - Add llvm_unreachable after fully-covered switches to appease GCC

Alexey Samsonov samsonov at google.com
Thu Mar 20 00:30:41 PDT 2014


Author: samsonov
Date: Thu Mar 20 02:30:40 2014
New Revision: 204318

URL: http://llvm.org/viewvc/llvm-project?rev=204318&view=rev
Log:
Add llvm_unreachable after fully-covered switches to appease GCC

Modified:
    llvm/trunk/lib/MC/MCFixup.cpp
    llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp

Modified: llvm/trunk/lib/MC/MCFixup.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCFixup.cpp?rev=204318&r1=204317&r2=204318&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCFixup.cpp (original)
+++ llvm/trunk/lib/MC/MCFixup.cpp Thu Mar 20 02:30:40 2014
@@ -29,6 +29,7 @@ static MCSymbolRefExpr::VariantKind getA
     return getAccessVariant(ABE->getLHS());
   }
   }
+  llvm_unreachable("unknown MCExpr kind");
 }
 
 MCSymbolRefExpr::VariantKind MCFixup::getAccessVariant() const {

Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp?rev=204318&r1=204317&r2=204318&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Thu Mar 20 02:30:40 2014
@@ -74,6 +74,7 @@ static MCSymbolRefExpr::VariantKind getA
   case PPCMCExpr::VK_PPC_HIGHESTA:
     return MCSymbolRefExpr::VK_PPC_HIGHESTA;
   }
+  llvm_unreachable("unknown PPCMCExpr kind");
 }
 
 unsigned PPCELFObjectWriter::getRelocTypeInner(const MCValue &Target,





More information about the llvm-commits mailing list