]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIECollection.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / tools / lldb / source / Plugins / SymbolFile / DWARF / DWARFDIECollection.h
1 //===-- DWARFDIECollection.h ------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef SymbolFileDWARF_DWARFDIECollection_h_
11 #define SymbolFileDWARF_DWARFDIECollection_h_
12
13 #include "SymbolFileDWARF.h"
14 #include <vector>
15
16 class DWARFDIECollection
17 {
18 public:
19     DWARFDIECollection() :
20         m_dies()
21     {
22     }
23     ~DWARFDIECollection()
24     {
25     }
26
27     void
28     Append (const DWARFDebugInfoEntry *die);
29
30     void
31     Dump(lldb_private::Stream *s, const char* title) const;
32
33     const DWARFDebugInfoEntry*
34     GetDIEPtrAtIndex(uint32_t idx) const;
35
36     bool
37     Insert(const DWARFDebugInfoEntry *die);
38
39     size_t
40     Size() const;
41
42 protected:
43     typedef std::vector<const DWARFDebugInfoEntry *>    collection;
44     typedef collection::iterator                iterator;
45     typedef collection::const_iterator          const_iterator;
46
47     collection m_dies;  // Ordered list of die offsets
48 };
49
50
51 #endif  // SymbolFileDWARF_DWARFDIECollection_h_