[llvm] r273161 - Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 08:37:16 PDT 2016
Author: aaronballman
Date: Mon Jun 20 10:37:15 2016
New Revision: 273161
URL: http://llvm.org/viewvc/llvm-project?rev=273161&view=rev
Log:
Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.
Modified:
llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp?rev=273161&r1=273160&r2=273161&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp Mon Jun 20 10:37:15 2016
@@ -26,29 +26,23 @@ using namespace llvm;
MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO,
const MCSymbol *Symbol) {
- const MCExpr *Expr;
- unsigned Option = MO.getTargetFlags() & ARMII::MO_OPTION_MASK;
- switch (Option) {
- default: {
- Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
- OutContext);
- switch (Option) {
- default: llvm_unreachable("Unknown target flag on symbol operand");
- case ARMII::MO_NO_FLAG:
- break;
- case ARMII::MO_LO16:
- Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
- OutContext);
- Expr = ARMMCExpr::createLower16(Expr, OutContext);
- break;
- case ARMII::MO_HI16:
- Expr = MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None,
- OutContext);
- Expr = ARMMCExpr::createUpper16(Expr, OutContext);
- break;
- }
+ const MCExpr *Expr =
+ MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
+ switch (MO.getTargetFlags() & ARMII::MO_OPTION_MASK) {
+ default:
+ llvm_unreachable("Unknown target flag on symbol operand");
+ case ARMII::MO_NO_FLAG:
+ break;
+ case ARMII::MO_LO16:
+ Expr =
+ MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
+ Expr = ARMMCExpr::createLower16(Expr, OutContext);
+ break;
+ case ARMII::MO_HI16:
+ Expr =
+ MCSymbolRefExpr::create(Symbol, MCSymbolRefExpr::VK_None, OutContext);
+ Expr = ARMMCExpr::createUpper16(Expr, OutContext);
break;
- }
}
if (!MO.isJTI() && MO.getOffset())
More information about the llvm-commits
mailing list