LLDB  mainline
SymbolFileDWARFDwo.h
Go to the documentation of this file.
1 //===-- SymbolFileDWARFDwo.h ------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
11 
12 #include "SymbolFileDWARF.h"
13 
15  /// LLVM RTTI support.
16  static char ID;
17 
18 public:
19  /// LLVM RTTI support.
20  /// \{
21  bool isA(const void *ClassID) const override {
22  return ClassID == &ID || SymbolFileDWARF::isA(ClassID);
23  }
24  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
25  /// \}
26 
28  lldb::ObjectFileSP objfile, uint32_t id);
29 
30  ~SymbolFileDWARFDwo() override = default;
31 
33 
35  llvm::function_ref<bool(DWARFDIE die)> callback) override;
36 
37  llvm::Expected<lldb_private::TypeSystem &>
39 
40  DWARFDIE
41  GetDIE(const DIERef &die_ref) override;
42 
43  llvm::Optional<uint32_t> GetDwoNum() override { return GetID() >> 32; }
44 
45 protected:
46  DIEToTypePtr &GetDIEToType() override;
47 
49 
51 
53 
55 
57  const DWARFDeclContext &die_decl_ctx) override;
58 
60  const DWARFDIE &die, lldb_private::ConstString type_name,
61  bool must_be_implementation) override;
62 
64 
65  /// If this file contains exactly one compile unit, this function will return
66  /// it. Otherwise it returns nullptr.
68 
70 };
71 
72 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
lldb_private::SymbolFile::SymbolFile
SymbolFile(lldb::ObjectFileSP objfile_sp)
Definition: SymbolFile.h:68
SymbolFileDWARFDwo::ID
static char ID
LLVM RTTI support.
Definition: SymbolFileDWARFDwo.h:16
SymbolFileDWARF::SymbolFileDWARFDwo
friend class SymbolFileDWARFDwo
Definition: SymbolFileDWARF.h:73
DIERef
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:26
SymbolFileDWARFDwo::GetDIEToVariable
DIEToVariableSP & GetDIEToVariable() override
Definition: SymbolFileDWARFDwo.cpp:83
SymbolFileDWARFDwo::GetBaseSymbolFile
SymbolFileDWARF & GetBaseSymbolFile()
Definition: SymbolFileDWARFDwo.h:63
SymbolFileDWARFDwo::FindDefinitionTypeForDWARFDeclContext
lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx) override
Definition: SymbolFileDWARFDwo.cpp:107
SymbolFileDWARFDwo::GetDwoNum
llvm::Optional< uint32_t > GetDwoNum() override
Definition: SymbolFileDWARFDwo.h:43
SymbolFileDWARFDwo::GetDIEToType
DIEToTypePtr & GetDIEToType() override
Definition: SymbolFileDWARFDwo.cpp:79
SymbolFileDWARF::DIEToClangType
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToClangType
Definition: SymbolFileDWARF.h:328
SymbolFileDWARF
Definition: SymbolFileDWARF.h:58
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
SymbolFileDWARF.h
SymbolFileDWARFDwo::GetObjCMethods
void GetObjCMethods(lldb_private::ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override
Definition: SymbolFileDWARFDwo.cpp:97
SymbolFileDWARF::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFileDWARF.h:66
DWARFDIE
Definition: DWARFDIE.h:15
DWARFCompileUnit
Definition: DWARFCompileUnit.h:15
SymbolFileDWARFDwo::GetTypeSystemForLanguage
llvm::Expected< lldb_private::TypeSystem & > GetTypeSystemForLanguage(lldb::LanguageType language) override
Definition: SymbolFileDWARFDwo.cpp:121
SymbolFileDWARFDwo::FindSingleCompileUnit
DWARFCompileUnit * FindSingleCompileUnit()
If this file contains exactly one compile unit, this function will return it.
Definition: SymbolFileDWARFDwo.cpp:57
lldb_private::ConstString
Definition: ConstString.h:40
SymbolFileDWARF::DIEToTypePtr
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::Type * > DIEToTypePtr
Definition: SymbolFileDWARF.h:323
SymbolFileDWARFDwo::GetForwardDeclDieToClangType
DIEToClangType & GetForwardDeclDieToClangType() override
Definition: SymbolFileDWARFDwo.cpp:88
SymbolFileDWARF::ClangTypeToDIE
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > ClangTypeToDIE
Definition: SymbolFileDWARF.h:329
UniqueDWARFASTTypeMap
Definition: UniqueDWARFASTType.h:75
lldb_private::UserID::GetID
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:47
SymbolFileDWARFDwo::GetDIE
DWARFDIE GetDIE(const DIERef &die_ref) override
Definition: SymbolFileDWARFDwo.cpp:126
SymbolFileDWARFDwo::GetDWOCompileUnitForHash
DWARFCompileUnit * GetDWOCompileUnitForHash(uint64_t hash)
Definition: SymbolFileDWARFDwo.cpp:38
SymbolFileDWARF::DIEToVariableSP
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
Definition: SymbolFileDWARF.h:325
SymbolFileDWARFDwo::~SymbolFileDWARFDwo
~SymbolFileDWARFDwo() override=default
SymbolFileDWARFDwo::GetUniqueDWARFASTTypeMap
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap() override
Definition: SymbolFileDWARFDwo.cpp:103
uint32_t
SymbolFileDWARFDwo::classof
static bool classof(const SymbolFile *obj)
Definition: SymbolFileDWARFDwo.h:24
SymbolFileDWARFDwo::GetForwardDeclClangTypeToDie
ClangTypeToDIE & GetForwardDeclClangTypeToDie() override
Definition: SymbolFileDWARFDwo.cpp:93
SymbolFileDWARFDwo::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFileDWARFDwo.h:21
SymbolFileDWARFDwo
Definition: SymbolFileDWARFDwo.h:14
SymbolFileDWARFDwo::FindCompleteObjCDefinitionTypeForDIE
lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation) override
Definition: SymbolFileDWARFDwo.cpp:113
SymbolFileDWARFDwo::m_base_symbol_file
SymbolFileDWARF & m_base_symbol_file
Definition: SymbolFileDWARFDwo.h:69
DWARFDeclContext
Definition: DWARFDeclContext.h:23