1 //===- DWARFTypeUnit.h ------------------------------------------*- 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 #ifndef LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
11 #define LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/DebugInfo/DWARF/DWARFUnit.h"
15 #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
16 #include "llvm/Support/DataExtractor.h"
22 class DWARFDebugAbbrev;
26 class DWARFTypeUnit : public DWARFUnit {
32 DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section,
33 const DWARFDebugAbbrev *DA, const DWARFSection *RS,
34 StringRef SS, StringRef SOS, StringRef AOS, StringRef LS,
35 bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection,
36 const DWARFUnitIndex::Entry *Entry)
37 : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO,
38 UnitSection, Entry) {}
40 uint32_t getHeaderSize() const override {
41 return DWARFUnit::getHeaderSize() + 12;
44 void dump(raw_ostream &OS, bool Brief = false);
45 static const DWARFSectionKind Section = DW_SECT_TYPES;
48 bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override;
51 } // end namespace llvm
53 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H