1 //===-- SymbolFileDWARFDwo.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 SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
10 #define SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
12 #include "SymbolFileDWARF.h"
14 class SymbolFileDWARFDwo : public SymbolFileDWARF {
15 /// LLVM RTTI support.
19 /// LLVM RTTI support.
21 bool isA(const void *ClassID) const override {
22 return ClassID == &ID || SymbolFileDWARF::isA(ClassID);
24 static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
27 SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFCompileUnit &dwarf_cu);
29 ~SymbolFileDWARFDwo() override = default;
31 lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu) override;
33 DWARFCompileUnit *GetCompileUnit();
36 GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
38 size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name,
39 DIEArray &method_die_offsets) override;
41 llvm::Expected<lldb_private::TypeSystem &>
42 GetTypeSystemForLanguage(lldb::LanguageType language) override;
45 GetDIE(const DIERef &die_ref) override;
47 DWARFCompileUnit *GetBaseCompileUnit() override { return &m_base_dwarf_cu; }
49 llvm::Optional<uint32_t> GetDwoNum() override { return GetID() >> 32; }
52 void LoadSectionData(lldb::SectionType sect_type,
53 lldb_private::DWARFDataExtractor &data) override;
55 DIEToTypePtr &GetDIEToType() override;
57 DIEToVariableSP &GetDIEToVariable() override;
59 DIEToClangType &GetForwardDeclDieToClangType() override;
61 ClangTypeToDIE &GetForwardDeclClangTypeToDie() override;
63 UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap() override;
65 lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(
66 const DWARFDeclContext &die_decl_ctx) override;
68 lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(
69 const DWARFDIE &die, lldb_private::ConstString type_name,
70 bool must_be_implementation) override;
72 SymbolFileDWARF &GetBaseSymbolFile();
74 DWARFCompileUnit *ComputeCompileUnit();
76 DWARFCompileUnit &m_base_dwarf_cu;
77 DWARFCompileUnit *m_cu = nullptr;
80 #endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_