aboutsummaryrefslogtreecommitdiffstats
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
commit5b842c369097b22e0abca58bfc49e63919b28a58 (patch)
tree468e05afaedffa42ebaf173850d21aabb5a702e0
parent224a19c490da17c6ed75245a4a7ef49cd25f6cdf (diff)
downloadexternal_llvm-5b842c369097b22e0abca58bfc49e63919b28a58.zip
external_llvm-5b842c369097b22e0abca58bfc49e63919b28a58.tar.gz
external_llvm-5b842c369097b22e0abca58bfc49e63919b28a58.tar.bz2
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
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index c615aba..183c691 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"