blob: 16b9bfb5de5611934825b72f41f8695d09a42cdf [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- DWARFCompileUnit.h ---------------------------------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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 Scull5e1ddfa2018-08-14 10:06:54 +01006//
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
15namespace llvm {
16
17class DWARFCompileUnit : public DWARFUnit {
18public:
19 DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section,
Andrew Walbran16937d02019-10-22 13:54:20 +010020 const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
21 const DWARFSection *RS, const DWARFSection *LocSection,
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010022 StringRef SS, const DWARFSection &SOS,
23 const DWARFSection *AOS, const DWARFSection &LS, bool LE,
Andrew Scullcdfcccc2018-10-05 20:58:37 +010024 bool IsDWO, const DWARFUnitVector &UnitVector)
Andrew Walbran16937d02019-10-22 13:54:20 +010025 : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
26 LS, LE, IsDWO, UnitVector) {}
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010027
Andrew Scullcdfcccc2018-10-05 20:58:37 +010028 /// VTable anchor.
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010029 ~DWARFCompileUnit() override;
Andrew Scullcdfcccc2018-10-05 20:58:37 +010030 /// 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 Scull5e1ddfa2018-08-14 10:06:54 +010034};
35
36} // end namespace llvm
37
38#endif // LLVM_DEBUGINFO_DWARFCOMPILEUNIT_H