[llvm] r279420 - [X86] Explicitly list all X86 instruction forms in switch statement so its easier to detect when one is missing. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 00:38:31 PDT 2016


Author: ctopper
Date: Mon Aug 22 02:38:30 2016
New Revision: 279420

URL: http://llvm.org/viewvc/llvm-project?rev=279420&view=rev
Log:
[X86] Explicitly list all X86 instruction forms in switch statement so its easier to detect when one is missing. NFC

Modified:
    llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp

Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=279420&r1=279419&r2=279420&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original)
+++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Mon Aug 22 02:38:30 2016
@@ -841,7 +841,16 @@ void RecognizableInstr::emitDecodePath(D
     }
 
     switch (Form) {
-    default:
+    default: llvm_unreachable("Invalid form!");
+    case X86Local::Pseudo: llvm_unreachable("Pseudo should not be emitted!");
+    case X86Local::RawFrm:
+    case X86Local::AddRegFrm:
+    case X86Local::RawFrmMemOffs:
+    case X86Local::RawFrmSrc:
+    case X86Local::RawFrmDst:
+    case X86Local::RawFrmDstSrc:
+    case X86Local::RawFrmImm8:
+    case X86Local::RawFrmImm16:
       filter = new DumbFilter();
       break;
     case X86Local::MRMDestReg: case X86Local::MRMDestMem:




More information about the llvm-commits mailing list