OSDN Git Service

Update LabelsBeforeInsn also, when creating unknown-position labels.
authorDan Gohman <gohman@apple.com>
Thu, 6 May 2010 00:29:41 +0000 (00:29 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 6 May 2010 00:29:41 +0000 (00:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103145 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 4da5498..4dc5305 100644 (file)
@@ -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;
   }