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,29 +26,23 @@ 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); case ARMII::MO_NO_FLAG:
switch (Option) { break;
default: llvm_unreachable("Unknown target flag on symbol operand"); case ARMII::MO_LO16:
case ARMII::MO_NO_FLAG: Expr =
break; MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
case ARMII::MO_LO16: Expr = ARMMCExpr::createLower16(Expr, OutContext);
Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, break;
OutContext); case ARMII::MO_HI16:
Expr = ARMMCExpr::createLower16(Expr, OutContext); Expr =
break; MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
case ARMII::MO_HI16: Expr = ARMMCExpr::createUpper16(Expr, OutContext);
Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
OutContext);
Expr = ARMMCExpr::createUpper16(Expr, OutContext);
break;
}
break; break;
}
} }
if (!MO.isJTI() && MO.getOffset()) if (!MO.isJTI() && MO.getOffset())