LLVM  6.0.0svn
DWARFTypeUnit.h
Go to the documentation of this file.
1 //===- DWARFTypeUnit.h ------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
11 #define LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
12 
13 #include "llvm/ADT/StringRef.h"
17 #include <cstdint>
18 
19 namespace llvm {
20 
21 class DWARFContext;
22 class DWARFDebugAbbrev;
23 struct DWARFSection;
24 class raw_ostream;
25 
26 class DWARFTypeUnit : public DWARFUnit {
27 private:
28  uint64_t TypeHash;
29  uint32_t TypeOffset;
30 
31 public:
33  const DWARFDebugAbbrev *DA, const DWARFSection *RS,
34  StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
35  const DWARFSection &LS, bool LE, bool IsDWO,
36  const DWARFUnitSectionBase &UnitSection,
37  const DWARFUnitIndex::Entry *Entry)
38  : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO,
39  UnitSection, Entry) {}
40 
41  uint32_t getHeaderSize() const override {
42  return DWARFUnit::getHeaderSize() + 12;
43  }
44 
45  void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {});
47 
48 protected:
49  bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override;
50 };
51 
52 } // end namespace llvm
53 
54 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
void dump(raw_ostream &OS, DIDumpOptions DumpOpts={})
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
virtual uint32_t getHeaderSize() const
Size in bytes of the unit header.
Definition: DWARFUnit.h:220
static const DWARFSectionKind Section
Definition: DWARFTypeUnit.h:46
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:153
bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override
DWARFSectionKind
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:59
DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection, const DWARFUnitIndex::Entry *Entry)
Definition: DWARFTypeUnit.h:32
uint32_t getHeaderSize() const override
Size in bytes of the unit header.
Definition: DWARFTypeUnit.h:41
Base class for all DWARFUnitSection classes.
Definition: DWARFUnit.h:45
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49