142288 broke the build:
[oota-llvm.git] / lib / Target / PTX / PTX.td
index 7d0be8bfe54410b792ffbc8ce529d2d83139e361..693bb9c483446a29b758723bad842c9e1ef7de8d 100644 (file)
@@ -121,10 +121,21 @@ include "PTXInstrInfo.td"
 
 def PTXInstrInfo : InstrInfo;
 
+//===----------------------------------------------------------------------===//
+// Assembly printer
+//===----------------------------------------------------------------------===//
+// PTX uses the MC printer for asm output, so make sure the TableGen
+// AsmWriter bits get associated with the correct class.
+def PTXAsmWriter : AsmWriter {
+  string AsmWriterClassName  = "InstPrinter";
+  bit isMCAsmWriter = 1;
+}
+
 //===----------------------------------------------------------------------===//
 // Target Declaration
 //===----------------------------------------------------------------------===//
 
 def PTX : Target {
   let InstructionSet = PTXInstrInfo;
+  let AssemblyWriters = [PTXAsmWriter];
 }