1 //===-- DWARFCompileUnit.h --------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFCOMPILEUNIT_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFCOMPILEUNIT_H
12 #include "DWARFUnit.h"
13 #include "llvm/Support/Error.h"
16 class DWARFAbbreviationDeclarationSet
;
19 namespace lldb_private::plugin
{
21 class DWARFCompileUnit
: public DWARFUnit
{
23 void BuildAddressRangeTable(DWARFDebugAranges
*debug_aranges
) override
;
25 void Dump(Stream
*s
) const override
;
27 static bool classof(const DWARFUnit
*unit
) { return !unit
->IsTypeUnit(); }
29 DWARFCompileUnit
&GetNonSkeletonUnit();
31 DWARFDIE
LookupAddress(const dw_addr_t address
);
34 DWARFCompileUnit(SymbolFileDWARF
&dwarf
, lldb::user_id_t uid
,
35 const llvm::DWARFUnitHeader
&header
,
36 const llvm::DWARFAbbreviationDeclarationSet
&abbrevs
,
37 DIERef::Section section
, bool is_dwo
)
38 : DWARFUnit(dwarf
, uid
, header
, abbrevs
, section
, is_dwo
) {}
40 DWARFCompileUnit(const DWARFCompileUnit
&) = delete;
41 const DWARFCompileUnit
&operator=(const DWARFCompileUnit
&) = delete;
43 friend class DWARFUnit
;
46 } // namespace lldb_private::plugin
48 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFCOMPILEUNIT_H