From b6ec8cae3cf437ea4e3d39ad209a0687df4686c3 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 22 Sep 2010 23:01:28 +0000 Subject: [PATCH] Enable a few additional asserts in MC instruction lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114601 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMMCInstLower.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/Target/ARM/ARMMCInstLower.cpp b/lib/Target/ARM/ARMMCInstLower.cpp index e54e76a8ced..ecd289c7962 100644 --- a/lib/Target/ARM/ARMMCInstLower.cpp +++ b/lib/Target/ARM/ARMMCInstLower.cpp @@ -75,11 +75,10 @@ GetJumpTableSymbol(const MachineOperand &MO) const { raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "JTI" << Printer.getFunctionNumber() << '_' << MO.getIndex(); -#if 0 switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); + default: assert(0 && "Unknown target flag on jump table operand"); + case 0: break; } -#endif // Create a symbol for the name. return Ctx.GetOrCreateSymbol(Name.str()); @@ -91,11 +90,10 @@ GetConstantPoolIndexSymbol(const MachineOperand &MO) const { raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "CPI" << Printer.getFunctionNumber() << '_' << MO.getIndex(); -#if 0 switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); + default: assert(0 && "Unknown target flag on CPI operand"); + case 0: break; } -#endif // Create a symbol for the name. return Ctx.GetOrCreateSymbol(Name.str()); @@ -107,11 +105,10 @@ LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const { // lot of extra uniquing. const MCExpr *Expr = MCSymbolRefExpr::Create(Sym, Ctx); -#if 0 switch (MO.getTargetFlags()) { - default: llvm_unreachable("Unknown target flag on GV operand"); + default: assert(0 && "Unknown target flag on Symbol operand"); + case 0: break; } -#endif if (!MO.isJTI() && MO.getOffset()) Expr = MCBinaryExpr::CreateAdd(Expr, -- 2.34.1