aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-05-01 16:41:11 +0000
committerDale Johannesen <dalej@apple.com>2010-05-01 16:41:11 +0000
commitd014761c9337f270f497aa960d51ee424bb166d5 (patch)
tree5153001d9b02ec58a6d6d3a8e3a5b6f7a2010a45
parent752e2590585227f6f10e80978f587915d9adb2ad (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102843 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 2c92de82d8..ded4b3f18b 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/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;
}