[llvm-commits] [llvm] r123317 - /llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
Matt Beaumont-Gay
matthewbg at google.com
Wed Jan 12 10:02:55 PST 2011
Author: matthewbg
Date: Wed Jan 12 12:02:55 2011
New Revision: 123317
URL: http://llvm.org/viewvc/llvm-project?rev=123317&view=rev
Log:
Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC.
Modified:
llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp?rev=123317&r1=123316&r2=123317&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp Wed Jan 12 12:02:55 2011
@@ -129,7 +129,7 @@
SmallVectorImpl<MCFixup> &Fixups) const {
ARM_AM::AMSubMode Mode = (ARM_AM::AMSubMode)MI.getOperand(OpIdx).getImm();
switch (Mode) {
- default: llvm_unreachable("Unknown addressing sub-mode!");
+ default: assert(0 && "Unknown addressing sub-mode!");
case ARM_AM::da: return 0;
case ARM_AM::ia: return 1;
case ARM_AM::db: return 2;
@@ -646,9 +646,9 @@
// but this is good enough for now.
static bool EvaluateAsPCRel(const MCExpr *Expr) {
switch (Expr->getKind()) {
+ default: assert(0 && "Unexpected expression type");
case MCExpr::SymbolRef: return false;
case MCExpr::Binary: return true;
- default: llvm_unreachable("Unexpected expression type");
}
}
@@ -669,7 +669,7 @@
const MCExpr *OrigExpr = MO.getExpr();
MCFixupKind Kind;
switch (Expr->getKind()) {
- default: llvm_unreachable("Unsupported ARMFixup");
+ default: assert(0 && "Unsupported ARMFixup");
case MCSymbolRefExpr::VK_ARM_HI16:
Kind = MCFixupKind(ARM::fixup_arm_movt_hi16);
if (EvaluateAsPCRel(OrigExpr))
More information about the llvm-commits
mailing list