Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.

llvm-svn: 273161
This commit is contained in:
Aaron Ballman 2016-06-20 15:37:15 +00:00
parent 1c28b6d733
commit 86100fc8be
1 changed files with 16 additions and 22 deletions

View File

@ -26,30 +26,24 @@ using namespace llvm;
MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO, MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO,
const MCSymbol *Symbol) { const MCSymbol *Symbol) {
const MCExpr *Expr; const MCExpr *Expr =
unsigned Option = MO.getTargetFlags() & ARMII::MO_OPTION_MASK; MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
switch (Option) { switch (MO.getTargetFlags() & ARMII::MO_OPTION_MASK) {
default: { default:
Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, llvm_unreachable("Unknown target flag on symbol operand");
OutContext);
switch (Option) {
default: llvm_unreachable("Unknown target flag on symbol operand");
case ARMII::MO_NO_FLAG: case ARMII::MO_NO_FLAG:
break; break;
case ARMII::MO_LO16: case ARMII::MO_LO16:
Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, Expr =
OutContext); MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
Expr = ARMMCExpr::createLower16(Expr, OutContext); Expr = ARMMCExpr::createLower16(Expr, OutContext);
break; break;
case ARMII::MO_HI16: case ARMII::MO_HI16:
Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, Expr =
OutContext); MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
Expr = ARMMCExpr::createUpper16(Expr, OutContext); Expr = ARMMCExpr::createUpper16(Expr, OutContext);
break; break;
} }
break;
}
}
if (!MO.isJTI() && MO.getOffset()) if (!MO.isJTI() && MO.getOffset())
Expr = MCBinaryExpr::createAdd(Expr, Expr = MCBinaryExpr::createAdd(Expr,