From 5b842c369097b22e0abca58bfc49e63919b28a58 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 Jun 2009 23:57:53 +0000 Subject: [PATCH] allow clients of the asmprinter to opt-out of the boilerplate with a #define. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73798 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmWriterEmitter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index c615abad506..183c6912bae 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -651,6 +651,8 @@ void AsmWriterEmitter::run(std::ostream &O) { 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 @@ void AsmWriterEmitter::run(std::ostream &O) { << " 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" -- 2.34.1