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 {
16 SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFCompileUnit &dwarf_cu);
18 ~SymbolFileDWARFDwo() override = default;
20 lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu) override;
22 DWARFCompileUnit *GetCompileUnit();
25 GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
27 lldb_private::DWARFExpression::LocationListFormat
28 GetLocationListFormat() const override;
30 size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name,
31 DIEArray &method_die_offsets) override;
33 lldb_private::TypeSystem *
34 GetTypeSystemForLanguage(lldb::LanguageType language) override;
37 GetDIE(const DIERef &die_ref) override;
39 std::unique_ptr<SymbolFileDWARFDwo>
40 GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
41 const DWARFDebugInfoEntry &cu_die) override {
45 DWARFCompileUnit *GetBaseCompileUnit() override { return &m_base_dwarf_cu; }
47 llvm::Optional<uint32_t> GetDwoNum() override { return GetID() >> 32; }
50 void LoadSectionData(lldb::SectionType sect_type,
51 lldb_private::DWARFDataExtractor &data) override;
53 DIEToTypePtr &GetDIEToType() override;
55 DIEToVariableSP &GetDIEToVariable() override;
57 DIEToClangType &GetForwardDeclDieToClangType() override;
59 ClangTypeToDIE &GetForwardDeclClangTypeToDie() override;
61 UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap() override;
63 lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(
64 const DWARFDeclContext &die_decl_ctx) override;
66 lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(
67 const DWARFDIE &die, lldb_private::ConstString type_name,
68 bool must_be_implementation) override;
70 SymbolFileDWARF &GetBaseSymbolFile();
72 DWARFCompileUnit *ComputeCompileUnit();
74 lldb::ObjectFileSP m_obj_file_sp;
75 DWARFCompileUnit &m_base_dwarf_cu;
76 DWARFCompileUnit *m_cu = nullptr;
79 #endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_