LLVM  8.0.1
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 public:
29  const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
30  const DWARFSection *RS, const DWARFSection *LocSection,
31  StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
32  const DWARFSection &LS, bool LE, bool IsDWO,
33  const DWARFUnitVector &UnitVector)
34  : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
35  LS, LE, IsDWO, UnitVector) {}
36 
37  uint64_t getTypeHash() const { return getHeader().getTypeHash(); }
39 
40  void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {}) override;
41  // Enable LLVM-style RTTI.
42  static bool classof(const DWARFUnit *U) { return U->isTypeUnit(); }
43 };
44 
45 } // end namespace llvm
46 
47 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
bool isTypeUnit() const
Definition: DWARFUnit.h:287
uint32_t getTypeOffset() const
Definition: DWARFTypeUnit.h:38
static bool classof(const DWARFUnit *U)
Definition: DWARFTypeUnit.h:42
uint32_t getTypeOffset() const
Definition: DWARFUnit.h:95
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:159
void dump(raw_ostream &OS, DIDumpOptions DumpOpts={}) override
Base class describing the header of any kind of "unit." Some information is specific to certain unit ...
Definition: DWARFUnit.h:47
const DWARFSection * LocSection
Definition: DWARFUnit.h:201
uint64_t getTypeHash() const
Definition: DWARFUnit.h:94
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:59
Describe a collection of units.
Definition: DWARFUnit.h:110
DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, const DWARFSection *RS, const DWARFSection *LocSection, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitVector &UnitVector)
Definition: DWARFTypeUnit.h:28
const DWARFUnitHeader & getHeader() const
Definition: DWARFUnit.h:242
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
uint64_t getTypeHash() const
Definition: DWARFTypeUnit.h:37
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49