[llvm-commits] [llvm] r73798 - /llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp

Chris Lattner sabre at nondot.org
Fri Jun 19 16:57:53 PDT 2009


Author: lattner
Date: Fri Jun 19 18:57:53 2009
New Revision: 73798

URL: http://llvm.org/viewvc/llvm-project?rev=73798&view=rev
Log:
allow clients of the asmprinter to opt-out of the boilerplate with a #define.

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

Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=73798&r1=73797&r2=73798&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Fri Jun 19 18:57:53 2009
@@ -651,6 +651,8 @@
 
   O << "  processDebugLoc(MI->getDebugLoc());\n\n";
 
+  O << "\n#ifndef NO_ASM_WRITER_BOILERPLATE\n";
+  
   O << "  if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
     << "    O << \"\\t\";\n"
     << "    printInlineAsm(MI);\n"
@@ -665,7 +667,9 @@
     << "    printImplicitDef(MI);\n"
     << "    return true;\n"
     << "  }\n\n";
-  
+
+  O << "\n#endif\n";
+
   O << "  O << \"\\t\";\n\n";
 
   O << "  // Emit the opcode for the instruction.\n"





More information about the llvm-commits mailing list