summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-03-05 22:41:20 +0000
committerEric Christopher <echristo@gmail.com>2014-03-05 22:41:20 +0000
commita27220fb8c15e0e09cb2175b155e9a27852f2392 (patch)
tree2db8cc643d96aa20176fd1d1a38e68b1d135d5bf /llvm/lib/CodeGen/AsmPrinter/DIE.h
parent3e373261667f848035ffecce72a4d03a65f21604 (diff)
downloadbcm5719-llvm-a27220fb8c15e0e09cb2175b155e9a27852f2392.tar.gz
bcm5719-llvm-a27220fb8c15e0e09cb2175b155e9a27852f2392.zip
Add a DIELocList class to handle pointers into the location list.
This enables us to figure out where in the debug_loc section our locations are so that we can eventually hash them. It also helps remove some special case code in emission. No functional change. llvm-svn: 203018
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.h b/llvm/lib/CodeGen/AsmPrinter/DIE.h
index fa39806f1aa..43dd6b2d23b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.h
@@ -202,7 +202,8 @@ public:
isEntry,
isTypeSignature,
isBlock,
- isLoc
+ isLoc,
+ isLocList,
};
protected:
@@ -541,6 +542,37 @@ public:
virtual void print(raw_ostream &O) const;
#endif
};
+
+//===--------------------------------------------------------------------===//
+/// DIELocList - Represents a pointer to a location list in the debug_loc
+/// section.
+//
+class DIELocList : public DIEValue {
+ // Index into the .debug_loc vector.
+ size_t Index;
+
+public:
+ DIELocList(size_t I) : DIEValue(isLocList), Index(I) {}
+
+ /// getValue - Grab the current index out.
+ size_t getValue() const { return Index; }
+
+ /// EmitValue - Emit location data.
+ ///
+ virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+
+ /// SizeOf - Determine size of location data in bytes.
+ ///
+ virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const DIEValue *E) { return E->getType() == isLocList; }
+
+#ifndef NDEBUG
+ virtual void print(raw_ostream &O) const;
+#endif
+};
+
} // end llvm namespace
#endif
OpenPOWER on IntegriCloud