Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 1 | //===- DWARFCompileUnit.h ---------------------------------------*- C++ -*-===// |
| 2 | // |
Andrew Walbran | 16937d0 | 2019-10-22 13:54:20 +0100 | [diff] [blame] | 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 |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_DEBUGINFO_DWARFCOMPILEUNIT_H |
| 10 | #define LLVM_DEBUGINFO_DWARFCOMPILEUNIT_H |
| 11 | |
| 12 | #include "llvm/DebugInfo/DWARF/DWARFUnit.h" |
| 13 | #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" |
| 14 | |
| 15 | namespace llvm { |
| 16 | |
| 17 | class DWARFCompileUnit : public DWARFUnit { |
| 18 | public: |
| 19 | DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section, |
Andrew Walbran | 16937d0 | 2019-10-22 13:54:20 +0100 | [diff] [blame] | 20 | const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA, |
| 21 | const DWARFSection *RS, const DWARFSection *LocSection, |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 22 | StringRef SS, const DWARFSection &SOS, |
| 23 | const DWARFSection *AOS, const DWARFSection &LS, bool LE, |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 24 | bool IsDWO, const DWARFUnitVector &UnitVector) |
Andrew Walbran | 16937d0 | 2019-10-22 13:54:20 +0100 | [diff] [blame] | 25 | : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS, |
| 26 | LS, LE, IsDWO, UnitVector) {} |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 27 | |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 28 | /// VTable anchor. |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 29 | ~DWARFCompileUnit() override; |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 30 | /// Dump this compile unit to \p OS. |
| 31 | void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override; |
| 32 | /// Enable LLVM-style RTTI. |
| 33 | static bool classof(const DWARFUnit *U) { return !U->isTypeUnit(); } |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // end namespace llvm |
| 37 | |
| 38 | #endif // LLVM_DEBUGINFO_DWARFCOMPILEUNIT_H |