From 75395847817b88798f9d8cdfb7bc99388167d291 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 6 May 2010 00:29:41 +0000 Subject: [PATCH] Update LabelsBeforeInsn also, when creating unknown-position labels. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103145 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4da549866bf..4dc53059c1a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2162,6 +2162,11 @@ void DwarfDebug::beginScope(const MachineInstr *MI) { PrevInstLoc = DL; PrevLabel = Label; } + + // If this instruction begins a scope then note down corresponding label. + if (InsnsBeginScopeSet.count(MI) != 0) + LabelsBeforeInsn[MI] = Label; + return; }