llvm.org GIT mirror llvm / 3008101
Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273161 91177308-0d34-0410-b5e6-96231b3b80d8 Aaron Ballman 4 years ago
1 changed file(s) with 16 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
2525
2626 MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO,
2727 const MCSymbol *Symbol) {
28 const MCExpr *Expr;
29 unsigned Option = MO.getTargetFlags() & ARMII::MO_OPTION_MASK;
30 switch (Option) {
31 default: {
32 Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
33 OutContext);
34 switch (Option) {
35 default: llvm_unreachable("Unknown target flag on symbol operand");
36 case ARMII::MO_NO_FLAG:
37 break;
38 case ARMII::MO_LO16:
39 Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
40 OutContext);
41 Expr = ARMMCExpr::createLower16(Expr, OutContext);
42 break;
43 case ARMII::MO_HI16:
44 Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
45 OutContext);
46 Expr = ARMMCExpr::createUpper16(Expr, OutContext);
47 break;
48 }
28 const MCExpr *Expr =
29 MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
30 switch (MO.getTargetFlags() & ARMII::MO_OPTION_MASK) {
31 default:
32 llvm_unreachable("Unknown target flag on symbol operand");
33 case ARMII::MO_NO_FLAG:
4934 break;
50 }
35 case ARMII::MO_LO16:
36 Expr =
37 MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
38 Expr = ARMMCExpr::createLower16(Expr, OutContext);
39 break;
40 case ARMII::MO_HI16:
41 Expr =
42 MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
43 Expr = ARMMCExpr::createUpper16(Expr, OutContext);
44 break;
5145 }
5246
5347 if (!MO.isJTI() && MO.getOffset())