[WebAssembly] Really disable wasm register name matcher
authorReid Kleckner <rnk@google.com>
Wed, 21 Mar 2018 21:46:47 +0000 (21:46 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 21 Mar 2018 21:46:47 +0000 (21:46 +0000)
The "ShouldEmitMatchRegisterName" bit wasn't taking effect because the
WebAssembly target didn't point to the custom WebAssemblyAsmParser
record.

llvm-svn: 328155

llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
llvm/lib/Target/WebAssembly/WebAssembly.td

index fb303a3..9d193f0 100644 (file)
@@ -32,10 +32,6 @@ using namespace llvm;
 
 #define DEBUG_TYPE "wasm-asm-parser"
 
-// TODO: TableGen generates this register name matcher, but it is not used
-// anywhere. Mark it with the "unused" attribute to suppress warnings.
-static unsigned LLVM_ATTRIBUTE_UNUSED MatchRegisterName(StringRef Name);
-
 namespace {
 
 // We store register types as SimpleValueType to retain SIMD layout
index f8408d3..33a4cd3 100644 (file)
@@ -77,11 +77,12 @@ def : ProcessorModel<"bleeding-edge", NoSchedModel,
 // Target Declaration
 //===----------------------------------------------------------------------===//
 
-def WebAssembly : Target {
-  let InstructionSet = WebAssemblyInstrInfo;
-}
-
 def WebAssemblyAsmParser : AsmParser {
   // The physical register names are not in the binary format or asm text
   let ShouldEmitMatchRegisterName = 0;
 }
+
+def WebAssembly : Target {
+  let InstructionSet = WebAssemblyInstrInfo;
+  let AssemblyParsers  = [WebAssemblyAsmParser];
+}