summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFContext.h
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-23 06:56:01 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-23 06:56:01 +0000
commita9debbfb01140fb0c0bd49bb8f4c119ad93c3aa6 (patch)
tree01a2c1916f438c9a744835eaaed71f11604d1124 /llvm/lib/DebugInfo/DWARFContext.h
parentda45a0fa6f72cca2877099b1859e6691ff27c1d9 (diff)
downloadbcm5719-llvm-a9debbfb01140fb0c0bd49bb8f4c119ad93c3aa6.tar.gz
bcm5719-llvm-a9debbfb01140fb0c0bd49bb8f4c119ad93c3aa6.zip
Make DWARFCompileUnit non-copyable
Summary: This is a part of D1164. DWARFCompileUnit is not that lightweight to copy it around, and we want it to own corresponding .dwo compile unit eventually. Reviewers: echristo Reviewed By: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1298 llvm-svn: 189089
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFContext.h')
-rw-r--r--llvm/lib/DebugInfo/DWARFContext.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARFContext.h b/llvm/lib/DebugInfo/DWARFContext.h
index 5d8f714505c..c491b4ca492 100644
--- a/llvm/lib/DebugInfo/DWARFContext.h
+++ b/llvm/lib/DebugInfo/DWARFContext.h
@@ -27,14 +27,14 @@ namespace llvm {
/// information parsing. The actual data is supplied through pure virtual
/// methods that a concrete implementation provides.
class DWARFContext : public DIContext {
- SmallVector<DWARFCompileUnit, 1> CUs;
+ SmallVector<DWARFCompileUnit *, 1> CUs;
OwningPtr<DWARFDebugAbbrev> Abbrev;
OwningPtr<DWARFDebugLoc> Loc;
OwningPtr<DWARFDebugAranges> Aranges;
OwningPtr<DWARFDebugLine> Line;
OwningPtr<DWARFDebugFrame> DebugFrame;
- SmallVector<DWARFCompileUnit, 1> DWOCUs;
+ SmallVector<DWARFCompileUnit *, 1> DWOCUs;
OwningPtr<DWARFDebugAbbrev> AbbrevDWO;
DWARFContext(DWARFContext &) LLVM_DELETED_FUNCTION;
@@ -49,6 +49,7 @@ class DWARFContext : public DIContext {
public:
DWARFContext() : DIContext(CK_DWARF) {}
+ virtual ~DWARFContext();
static bool classof(const DIContext *DICtx) {
return DICtx->getKind() == CK_DWARF;
@@ -74,14 +75,14 @@ public:
DWARFCompileUnit *getCompileUnitAtIndex(unsigned index) {
if (CUs.empty())
parseCompileUnits();
- return &CUs[index];
+ return CUs[index];
}
/// Get the compile unit at the specified index for the DWO compile units.
DWARFCompileUnit *getDWOCompileUnitAtIndex(unsigned index) {
if (DWOCUs.empty())
parseDWOCompileUnits();
- return &DWOCUs[index];
+ return DWOCUs[index];
}
/// Get a pointer to the parsed DebugAbbrev object.
OpenPOWER on IntegriCloud