1 //===-- DWARFDIECollection.cpp ----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "DWARFDIECollection.h"
14 #include "lldb/Core/Stream.h"
16 using namespace lldb_private;
20 DWARFDIECollection::Append (const DWARFDIE &die)
22 m_dies.push_back (die);
26 DWARFDIECollection::GetDIEAtIndex(uint32_t idx) const
28 if (idx < m_dies.size())
35 DWARFDIECollection::Size() const
41 DWARFDIECollection::Dump(Stream *s, const char* title) const
43 if (title && title[0] != '\0')
44 s->Printf( "%s\n", title);
45 for (const auto &die : m_dies)
46 s->Printf( "0x%8.8x\n", die.GetOffset());