Raise assertion when MachineOperand has unexpected target flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2011-07-08 00:42:35 +00:00
parent 18dfcb8a28
commit 0184336195

View File

@ -35,7 +35,8 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
int Offset = 0;
switch(MO.getTargetFlags()) {
default: Kind = MipsMCSymbolRefExpr::VK_Mips_None; break;
default: assert(0 && "Invalid target flag!");
case MipsII::MO_NO_FLAG: Kind = MipsMCSymbolRefExpr::VK_Mips_None; break;
case MipsII::MO_GPREL: Kind = MipsMCSymbolRefExpr::VK_Mips_GPREL; break;
case MipsII::MO_GOT_CALL: Kind = MipsMCSymbolRefExpr::VK_Mips_GOT_CALL; break;
case MipsII::MO_GOT: Kind = MipsMCSymbolRefExpr::VK_Mips_GOT; break;