LLVM 20.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"
14#include <cstdint>
15
16namespace llvm {
17
18struct DIDumpOptions;
19class DWARFContext;
20class DWARFDebugAbbrev;
21struct DWARFSection;
22class raw_ostream;
23
24class DWARFTypeUnit : public DWARFUnit {
25public:
26 DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section,
27 const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
28 const DWARFSection *RS, const DWARFSection *LocSection,
29 StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
30 const DWARFSection &LS, bool LE, bool IsDWO,
31 const DWARFUnitVector &UnitVector)
32 : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
33 LS, LE, IsDWO, UnitVector) {}
34
35 uint64_t getTypeHash() const { return getHeader().getTypeHash(); }
37
38 void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {}) override;
39 // Enable LLVM-style RTTI.
40 static bool classof(const DWARFUnit *U) { return U->isTypeUnit(); }
41};
42
43} // end namespace llvm
44
45#endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
raw_pwrite_stream & OS
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:48
uint64_t getTypeOffset() const
Definition: DWARFTypeUnit.h:36
void dump(raw_ostream &OS, DIDumpOptions DumpOpts={}) override
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:26
uint64_t getTypeHash() const
Definition: DWARFTypeUnit.h:35
static bool classof(const DWARFUnit *U)
Definition: DWARFTypeUnit.h:40
Base class describing the header of any kind of "unit." Some information is specific to certain unit ...
Definition: DWARFUnit.h:55
uint64_t getTypeHash() const
Definition: DWARFUnit.h:106
uint64_t getTypeOffset() const
Definition: DWARFUnit.h:107
Describe a collection of units.
Definition: DWARFUnit.h:128
const DWARFUnitHeader & getHeader() const
Definition: DWARFUnit.h:292
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:196