| 1 | //===- DWARFCompileUnit.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_DWARFCOMPILEUNIT_H |
| 10 | #define LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H |
| 11 | |
| 12 | #include "llvm/DebugInfo/DWARF/DWARFUnit.h" |
| 13 | #include "llvm/Support/Compiler.h" |
| 14 | |
| 15 | namespace llvm { |
| 16 | |
| 17 | class DWARFContext; |
| 18 | class DWARFDebugAbbrev; |
| 19 | class raw_ostream; |
| 20 | struct DIDumpOptions; |
| 21 | struct DWARFSection; |
| 22 | |
| 23 | class LLVM_ABI DWARFCompileUnit : public DWARFUnit { |
| 24 | public: |
| 25 | (DWARFContext &Context, const DWARFSection &Section, |
| 26 | const DWARFUnitHeader &, const DWARFDebugAbbrev *DA, |
| 27 | const DWARFSection *RS, const DWARFSection *LocSection, |
| 28 | StringRef SS, const DWARFSection &SOS, |
| 29 | const DWARFSection *AOS, const DWARFSection &LS, bool LE, |
| 30 | bool IsDWO, const DWARFUnitVector &UnitVector) |
| 31 | : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS, |
| 32 | LS, LE, IsDWO, UnitVector) {} |
| 33 | |
| 34 | /// VTable anchor. |
| 35 | ~DWARFCompileUnit() override; |
| 36 | /// Dump this compile unit to \p OS. |
| 37 | void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override; |
| 38 | /// Enable LLVM-style RTTI. |
| 39 | static bool classof(const DWARFUnit *U) { return !U->isTypeUnit(); } |
| 40 | }; |
| 41 | |
| 42 | } // end namespace llvm |
| 43 | |
| 44 | #endif // LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H |
| 45 | |