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/Utility/Stream.h"
16 using namespace lldb_private;
19 void DWARFDIECollection::Append(const DWARFDIE &die) { m_dies.push_back(die); }
22 DWARFDIECollection::GetDIEAtIndex(uint32_t idx) const {
23 if (idx < m_dies.size())
28 size_t DWARFDIECollection::Size() const { return m_dies.size(); }
30 void DWARFDIECollection::Dump(Stream *s, const char *title) const {
31 if (title && title[0] != '\0')
32 s->Printf("%s\n", title);
33 for (const auto &die : m_dies)
34 s->Printf("0x%8.8x\n", die.GetOffset());