[llvm-commits] [llvm] r102401 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Mon Apr 26 16:41:43 PDT 2010
Author: lattner
Date: Mon Apr 26 18:41:43 2010
New Revision: 102401
URL: http://llvm.org/viewvc/llvm-project?rev=102401&view=rev
Log:
add a comment in verbose-asm mode indicating why a noop is being generated.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=102401&r1=102400&r2=102401&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Apr 26 18:41:43 2010
@@ -589,9 +589,10 @@
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"));
}
More information about the llvm-commits
mailing list