diff options
author | Dale Johannesen <dalej@apple.com> | 2010-05-01 16:41:11 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-05-01 16:41:11 +0000 |
commit | 1ebb395ceefd0059911cda55dc0dade876ff068b (patch) | |
tree | a8eb92b53f44bdc2bbeeeddf5ae340e70eddbc2c /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 7911150a3d2c3412208ed366369f6e574e4a58ea (diff) | |
download | bcm5719-llvm-1ebb395ceefd0059911cda55dc0dade876ff068b.tar.gz bcm5719-llvm-1ebb395ceefd0059911cda55dc0dade876ff068b.zip |
Don't count debug info as instructions. This was
preventing the emission of the NOP on Darwin for a
function with no actual code. From timberwolfmc
with TEST=optllcdbg.
llvm-svn: 102843
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 2c92de82d86..ded4b3f18bb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -558,7 +558,8 @@ void AsmPrinter::EmitFunctionBody() { for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end(); II != IE; ++II) { // Print the assembly for the instruction. - if (!II->isLabel() && !II->isImplicitDef() && !II->isKill()) { + if (!II->isLabel() && !II->isImplicitDef() && !II->isKill() && + !II->isDebugValue()) { HasAnyRealCode = true; ++EmittedInsts; } |