1 //===-- DWARFUnitIndex.h --------------------------------------------------===//
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 #ifndef LLVM_LIB_DEBUGINFO_DWARFUNITINDEX_H
11 #define LLVM_LIB_DEBUGINFO_DWARFUNITINDEX_H
13 #include "llvm/Support/DataExtractor.h"
14 #include "llvm/Support/Format.h"
15 #include "llvm/Support/raw_ostream.h"
20 enum DWARFSectionKind {
31 class DWARFUnitIndex {
38 bool parse(DataExtractor IndexData, uint32_t *OffsetPtr);
39 void dump(raw_ostream &OS) const;
44 const DWARFUnitIndex *Index;
46 struct SectionContribution {
50 std::unique_ptr<SectionContribution[]> Contributions;
51 friend class DWARFUnitIndex;
54 const SectionContribution *getOffset(DWARFSectionKind Sec) const;
55 const SectionContribution *getOffset() const;
61 std::unique_ptr<DWARFSectionKind[]> ColumnKinds;
62 std::unique_ptr<Entry[]> Rows;
64 static StringRef getColumnHeader(DWARFSectionKind DS);
67 bool parse(DataExtractor IndexData);
68 void dump(raw_ostream &OS) const;
69 const Entry *getFromOffset(uint32_t Offset) const;