diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-02 01:43:18 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-02 01:43:18 +0000 |
commit | b2d73d1556b47a79d01b188be3cf0b25631d3982 (patch) | |
tree | 6441c18a43bd90365b57fa597f24b88a3b20a15d /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 91b97ccd87e94bafbf68de8023df51f2ab94ff1b (diff) | |
download | llvm-b2d73d1556b47a79d01b188be3cf0b25631d3982.tar.gz llvm-b2d73d1556b47a79d01b188be3cf0b25631d3982.tar.bz2 llvm-b2d73d1556b47a79d01b188be3cf0b25631d3982.tar.xz |
DebugInfo: Introduce DebugLocList to encapsulate a list of DebugLocEntries and an MC Label to refer to them
This removes the magic-number-esque code creating/retrieving the same
label for a debug_loc entry from two places and removes the last small
piece of reusable logic from emitDebugLoc so that there will be less
duplication when refactoring it into two functions (one for debug_loc,
the other for debug_loc.dwo).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index fcac25d520..424595070d 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -17,6 +17,7 @@ #include "AsmPrinterHandler.h" #include "DIE.h" #include "DebugLocEntry.h" +#include "DebugLocList.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -288,8 +289,9 @@ class DwarfDebug : public AsmPrinterHandler { // Collection of abstract variables. DenseMap<const MDNode *, DbgVariable *> AbstractVariables; - // Collection of DebugLocEntry. - SmallVector<SmallVector<DebugLocEntry, 4>, 4> DotDebugLocEntries; + // Collection of DebugLocEntry. Stored in a linked list so that DIELocLists + // can refer to them in spite of insertions into this list. + SmallVector<DebugLocList, 4> DotDebugLocEntries; // Collection of subprogram DIEs that are marked (at the end of the module) // as DW_AT_inline. @@ -686,7 +688,7 @@ public: const DwarfCompileUnit *getPrevCU() const { return PrevCU; } /// Returns the entries for the .debug_loc section. - const SmallVectorImpl<SmallVector<DebugLocEntry, 4>> & + const SmallVectorImpl<DebugLocList> & getDebugLocEntries() const { return DotDebugLocEntries; } |