LLVM  14.0.0git
DWARFTypeUnit.h
Go to the documentation of this file.
1 //===- DWARFTypeUnit.h ------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
10 #define LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
11 
12 #include "llvm/ADT/StringRef.h"
16 #include <cstdint>
17 
18 namespace llvm {
19 
20 class DWARFContext;
21 class DWARFDebugAbbrev;
22 struct DWARFSection;
23 class raw_ostream;
24 
25 class DWARFTypeUnit : public DWARFUnit {
26 public:
28  const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
29  const DWARFSection *RS, const DWARFSection *LocSection,
30  StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
31  const DWARFSection &LS, bool LE, bool IsDWO,
32  const DWARFUnitVector &UnitVector)
33  : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
34  LS, LE, IsDWO, UnitVector) {}
35 
36  uint64_t getTypeHash() const { return getHeader().getTypeHash(); }
38 
39  void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {}) override;
40  // Enable LLVM-style RTTI.
41  static bool classof(const DWARFUnit *U) { return U->isTypeUnit(); }
42 };
43 
44 } // end namespace llvm
45 
46 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
llvm::DWARFSection
Definition: DWARFSection.h:16
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
StringRef.h
llvm::DWARFContext
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:53
llvm::DWARFTypeUnit::getTypeHash
uint64_t getTypeHash() const
Definition: DWARFTypeUnit.h:36
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::DWARFDebugAbbrev
Definition: DWARFDebugAbbrev.h:56
llvm::X86AS::SS
@ SS
Definition: X86.h:189
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::AArch64CC::LE
@ LE
Definition: AArch64BaseInfo.h:268
uint64_t
llvm::DWARFUnit::isTypeUnit
bool isTypeUnit() const
Definition: DWARFUnit.h:296
llvm::DWARFUnitHeader
Base class describing the header of any kind of "unit." Some information is specific to certain unit ...
Definition: DWARFUnit.h:47
DWARFUnit.h
llvm::DWARFUnitHeader::getTypeOffset
uint64_t getTypeOffset() const
Definition: DWARFUnit.h:99
llvm::DWARFTypeUnit::getTypeOffset
uint64_t getTypeOffset() const
Definition: DWARFTypeUnit.h:37
llvm::DWARFTypeUnit::dump
void dump(raw_ostream &OS, DIDumpOptions DumpOpts={}) override
Definition: DWARFTypeUnit.cpp:20
llvm::DWARFTypeUnit::DWARFTypeUnit
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:27
llvm::M68kBeads::DA
@ DA
Definition: M68kBaseInfo.h:59
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::DWARFTypeUnit
Definition: DWARFTypeUnit.h:25
llvm::DWARFUnit
Definition: DWARFUnit.h:203
llvm::AArch64CC::LS
@ LS
Definition: AArch64BaseInfo.h:264
DataExtractor.h
DWARFUnitIndex.h
llvm::DWARFUnit::getHeader
const DWARFUnitHeader & getHeader() const
Definition: DWARFUnit.h:253
llvm::DWARFTypeUnit::classof
static bool classof(const DWARFUnit *U)
Definition: DWARFTypeUnit.h:41
llvm::DWARFUnitHeader::getTypeHash
uint64_t getTypeHash() const
Definition: DWARFUnit.h:98
llvm::DIDumpOptions
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:180
llvm::DWARFUnitVector
Describe a collection of units.
Definition: DWARFUnit.h:120