summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-11 22:39:40 +0000
committerChris Lattner <sabre@nondot.org>2009-08-11 22:39:40 +0000
commitabdcbc7ef2ecfcc821a02d5a3094cd6374d1fa8f (patch)
treed81de14eb1e0b817639f2dce5c6ffb3013cffd8c /llvm/lib/CodeGen/AsmPrinter
parentfd5defed1dff8eaeeb145eb3c507cc173267c0b6 (diff)
downloadbcm5719-llvm-abdcbc7ef2ecfcc821a02d5a3094cd6374d1fa8f.tar.gz
bcm5719-llvm-abdcbc7ef2ecfcc821a02d5a3094cd6374d1fa8f.zip
Change the asmprinter to print the comment character before the
"inlineasmstart/end" strings so that the contents of the directive are separate from the comment character. This lets elf targets get #APP/#NOAPP for free even if they don't use "#" as the comment character. This also allows hoisting the darwin stuff up to the shared TAI class. llvm-svn: 78737
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 50733e6cd53..55308967337 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1336,11 +1336,12 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
// If this asmstr is empty, just print the #APP/#NOAPP markers.
// These are useful to see where empty asm's wound up.
if (AsmStr[0] == 0) {
- O << TAI->getInlineAsmStart() << "\n\t" << TAI->getInlineAsmEnd() << '\n';
+ O << TAI->getCommentString() << TAI->getInlineAsmStart() << "\n\t";
+ O << TAI->getCommentString() << TAI->getInlineAsmEnd() << '\n';
return;
}
- O << TAI->getInlineAsmStart() << "\n\t";
+ O << TAI->getCommentString() << TAI->getInlineAsmStart() << "\n\t";
// The variant of the current asmprinter.
int AsmPrinterVariant = TAI->getAssemblerDialect();
@@ -1511,7 +1512,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
}
}
}
- O << "\n\t" << TAI->getInlineAsmEnd() << '\n';
+ O << "\n\t" << TAI->getCommentString() << TAI->getInlineAsmEnd() << '\n';
}
/// printImplicitDef - This method prints the specified machine instruction
OpenPOWER on IntegriCloud