summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DebugLocList.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-02 01:43:18 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-02 01:43:18 +0000
commitb2d73d1556b47a79d01b188be3cf0b25631d3982 (patch)
tree6441c18a43bd90365b57fa597f24b88a3b20a15d /lib/CodeGen/AsmPrinter/DebugLocList.h
parent91b97ccd87e94bafbf68de8023df51f2ab94ff1b (diff)
downloadllvm-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/DebugLocList.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DebugLocList.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DebugLocList.h b/lib/CodeGen/AsmPrinter/DebugLocList.h
new file mode 100644
index 0000000000..7a51c7bd5b
--- /dev/null
+++ b/lib/CodeGen/AsmPrinter/DebugLocList.h
@@ -0,0 +1,23 @@
+//===--- lib/CodeGen/DebugLocList.h - DWARF debug_loc list ------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef CODEGEN_ASMPRINTER_DEBUGLOCLIST_H__
+#define CODEGEN_ASMPRINTER_DEBUGLOCLIST_H__
+
+#include "llvm/MC/MCSymbol.h"
+#include "llvm/ADT/SmallVector.h"
+#include "DebugLocEntry.h"
+
+namespace llvm {
+struct DebugLocList {
+ MCSymbol *Label;
+ SmallVector<DebugLocEntry, 4> List;
+};
+}
+#endif