Fix formatting introduced in r200941
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 9 Feb 2014 09:49:29 +0000 (09:49 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 9 Feb 2014 09:49:29 +0000 (09:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201043 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
lib/CodeGen/RegisterPressure.cpp

index 8637c4d6519f9d06351e69400ead76fa1c76a3c7..7954423141f1cbf7f6d670ed4b5fe365d19b539b 100644 (file)
@@ -771,6 +771,7 @@ DwarfCompileUnit *DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
       Asm->OutStreamer.hasRawTextSupport() || (NewCU->getUniqueID() == 0);
 
   if (!useSplitDwarf()) {
+    NewCU->setStatementListIndex(Die->getValues().size());
     // DW_AT_stmt_list is a offset of line number information for this
     // compile unit in debug_line section. For split dwarf this is
     // left in the skeleton CU and so not included.
index 3f42e2f672813cfb5857a5ce31c529016dad00fa..61a50a79364873b4a4f368c08052d38815bb41c9 100644 (file)
@@ -534,6 +534,8 @@ private:
 };
 
 class DwarfCompileUnit : public DwarfUnit {
+  unsigned statementListIndex;
+
 public:
   DwarfCompileUnit(unsigned UID, DIE *D, DICompileUnit Node, AsmPrinter *A,
                    DwarfDebug *DW, DwarfFile *DWU);
@@ -545,6 +547,17 @@ public:
   /// addLabelAddress - Add a dwarf label attribute data and value using
   /// either DW_FORM_addr or DW_FORM_GNU_addr_index.
   void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
+
+  void setStatementListIndex(unsigned statementListIndex) {
+    this->statementListIndex = statementListIndex;
+  }
+
+  void initStatementList(DIE *D) const {
+    DIE *UD = getUnitDie();
+    D->addValue(dwarf::DW_AT_stmt_list,
+                UD->getAbbrev().getData()[statementListIndex].getForm(),
+                UD->getValues()[statementListIndex]);
+  }
 };
 
 class DwarfTypeUnit : public DwarfUnit {
index 249789a4b16bb58122386aec689d4d0954d152cc..cfeafbf403069a996b10ffdd27c8fa4e57a0b2a1 100644 (file)
@@ -512,8 +512,7 @@ bool RegPressureTracker::recede(SmallVectorImpl<unsigned> *LiveUses,
       // live-out, increase its PDiff value to avoid underflowing pressure.
       if (PDiff)
         PDiff->addPressureChange(Reg, false, MRI);
-    }
-    else {
+    } else {
       if (LiveRegs.erase(Reg))
         decreaseRegPressure(Reg);
       else