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
This commit is contained in:
Chris Lattner 2010-04-26 23:41:43 +00:00
parent ee9eb411ff
commit d61647d306

View File

@ -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"));
}