diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-26 23:41:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-26 23:41:43 +0000 |
commit | d61647d306bc297603c607411b2777b217cd65b6 (patch) | |
tree | d524f71bafd6e03af2b139571fc7c8795f5a4c67 | |
parent | ee9eb411fffddbb8fe70418c05946a131889b487 (diff) | |
download | external_llvm-d61647d306bc297603c607411b2777b217cd65b6.zip external_llvm-d61647d306bc297603c607411b2777b217cd65b6.tar.gz external_llvm-d61647d306bc297603c607411b2777b217cd65b6.tar.bz2 |
add a comment in verbose-asm mode indicating why a noop is being generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102401 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 55eec53..31cb0ca 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -589,9 +589,10 @@ void AsmPrinter::EmitFunctionBody() { if (MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode) { MCInst Noop; TM.getInstrInfo()->getNoopForMachoTarget(Noop); - if (Noop.getOpcode()) + if (Noop.getOpcode()) { + OutStreamer.AddComment("avoids zero-length function"); OutStreamer.EmitInstruction(Noop); - else // Target not mc-ized yet. + } else // Target not mc-ized yet. OutStreamer.EmitRawText(StringRef("\tnop\n")); } |