diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-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")); } |