From ee890edd69044b820d3ba3a3c45ad43288565eac Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 5 Jan 2010 16:59:17 +0000 Subject: If a scope has only one instruction then first instruction is also the last instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92736 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 61536d5d32..134a497ce0 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -218,7 +218,7 @@ public: // Use the end of last child scope as end of this scope. SmallVector &Scopes = getScopes(); - const MachineInstr *LastInsn = NULL; + const MachineInstr *LastInsn = getFirstInsn(); unsigned LIndex = 0; if (Scopes.empty()) { assert (getLastInsn() && "Inner most scope does not have last insn!"); -- cgit v1.2.3-18-g5258