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
This commit is contained in:
Dale Johannesen 2010-05-01 16:41:11 +00:00
parent 7911150a3d
commit 1ebb395cee
1 changed files with 2 additions and 1 deletions

View File

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