llvm-mc/AsmMatcher: Improve match code.
 - This doesn't actually improve the algorithm (its still linear), but the
   generated (match) code is now fairly compact and table driven. Still need a
   generic string matcher.

 - The table still needs to be compressed, this is quite simple to do and should
   shrink it to under 16k.

 - This also simplifies and restructures the code to make the match classes more
   explicit, in anticipation of resolving ambiguities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 62cce47..841b427 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -131,9 +131,7 @@
     return Mem.Scale;
   }
 
-  bool isToken(const StringRef &Str) const { 
-    return Kind == Token && Str == getToken(); 
-  }
+  bool isToken() const {return Kind == Token; }
 
   bool isImm() const { return Kind == Immediate; }
   
@@ -417,24 +415,4 @@
   RegisterAsmParser<X86ATTAsmParser> Y(TheX86_64Target);
 }
 
-// FIXME: Disabled for now, this is causing gcc-4.0 to run out of memory during
-// building.
-#if 0
-
 #include "X86GenAsmMatcher.inc"
-
-#else
-
-bool X86ATTAsmParser::MatchInstruction(SmallVectorImpl<X86Operand> &Operands,
-                                       MCInst &Inst) {
-  return false;
-}
-  
-bool X86ATTAsmParser::MatchRegisterName(const StringRef &Name,
-                                        unsigned &RegNo) {
-  RegNo = 1;
-  return false;
-}
-
-#endif
-