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 {
28 DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section,
29 const DWARFUnitHeader &Header,
30 const DWARFDebugAbbrev *DA, const DWARFSection *RS,
31 StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
32 const DWARFSection &LS, bool LE, bool IsDWO,
33 const DWARFUnitSectionBase &UnitSection)
34 : DWARFUnit(Context, Section, Header, DA, RS, SS, SOS, AOS, LS, LE, IsDWO,
37 uint64_t getTypeHash() const { return getHeader().getTypeHash(); }
38 uint32_t getTypeOffset() const { return getHeader().getTypeOffset(); }
40 void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {});
41 static const DWARFSectionKind Section = DW_SECT_TYPES;
44 } // end namespace llvm
46 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H