mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Mostly undo r123297, but move the default case in EvaluateAsPCRel to the top
of the switch block to appease GCC. llvm-svn: 123317
This commit is contained in:
parent
fb3f7c11f1
commit
fc76b0ce6e
@ -129,7 +129,7 @@ public:
|
||||
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 @@ static const MCSymbolRefExpr *FindLHSymExpr(const MCExpr *E) {
|
||||
// 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 @@ getMovtImmOpValue(const MCInst &MI, unsigned OpIdx,
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user