diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-11 22:39:40 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-11 22:39:40 +0000 |
| commit | cae14fd2f334ef46b141a5e400fc43528f5e5b43 (patch) | |
| tree | 15b1240b4ff1ad16135acf4096de957cb2facb80 /lib/CodeGen | |
| parent | eb75972692419eee5ea85909cea17b04abeeddc6 (diff) | |
| download | external_llvm-cae14fd2f334ef46b141a5e400fc43528f5e5b43.zip external_llvm-cae14fd2f334ef46b141a5e400fc43528f5e5b43.tar.gz external_llvm-cae14fd2f334ef46b141a5e400fc43528f5e5b43.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 50733e6..5530896 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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 |
