aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanak@gmail.com>2011-07-08 00:42:35 +0000
committerAkira Hatanaka <ahatanak@gmail.com>2011-07-08 00:42:35 +0000
commit01843361953463519db42e8098dc8b31b45407c8 (patch)
tree26fd5552a9c24f7630855508292ed27d31419c63 /lib/Target
parent18dfcb8a2809204e9cd38099a766e3bb101cc249 (diff)
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
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/Mips/MipsMCInstLower.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsMCInstLower.cpp b/lib/Target/Mips/MipsMCInstLower.cpp
index 73f4aa715b..f5cc3aa25f 100644
--- a/lib/Target/Mips/MipsMCInstLower.cpp
+++ b/lib/Target/Mips/MipsMCInstLower.cpp
@@ -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;