summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-19 23:57:53 +0000
committerChris Lattner <sabre@nondot.org>2009-06-19 23:57:53 +0000
commit681f79124a0982b5c28265fa6db0ce69fdeca067 (patch)
tree5dfe1ef365b87c953e7427b53cd9f3eacf6dadfd /llvm/utils
parentc9c02ed8f499f005b5a8e68f1ecd87401f90daa9 (diff)
downloadbcm5719-llvm-681f79124a0982b5c28265fa6db0ce69fdeca067.tar.gz
bcm5719-llvm-681f79124a0982b5c28265fa6db0ce69fdeca067.zip
allow clients of the asmprinter to opt-out of the boilerplate with a #define.
llvm-svn: 73798
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/AsmWriterEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp
index c615abad506..183c6912bae 100644
--- a/llvm/utils/TableGen/AsmWriterEmitter.cpp
+++ b/llvm/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"
OpenPOWER on IntegriCloud