diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h | 42 | 
1 files changed, 42 insertions, 0 deletions
| diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h index 2a5b5471a1d..2b1f893c1ea 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h +++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h @@ -10,6 +10,7 @@  #ifndef LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H  #define LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H +#include "lldb/Symbol/ClangASTImporter.h"  #include "lldb/Symbol/SymbolFile.h"  #include "llvm/ADT/DenseMap.h" @@ -144,22 +145,63 @@ public:    llvm::pdb::PDBFile &GetPDBFile() { return m_index->pdb(); }    const llvm::pdb::PDBFile &GetPDBFile() const { return m_index->pdb(); } +  ClangASTContext &GetASTContext() { return *m_clang; } +  ClangASTImporter &GetASTImporter() { return *m_importer; } +  private: +  void AddBaseClassesToLayout(CompilerType &derived_ct, +                              ClangASTImporter::LayoutInfo &layout, +                              const llvm::codeview::ClassRecord &record); +  void AddMembersToLayout(ClangASTImporter::LayoutInfo &layout, +                          const llvm::codeview::TagRecord &record); +  void AddMethodsToLayout(ClangASTImporter::LayoutInfo &layout, +                          const llvm::codeview::TagRecord &record); + +  size_t FindTypesByName(llvm::StringRef name, uint32_t max_matches, +                         TypeMap &types); + +  lldb::TypeSP CreateModifierType(PdbSymUid type_uid, +                                  const llvm::codeview::ModifierRecord &mr); +  lldb::TypeSP CreatePointerType(PdbSymUid type_uid, +                                 const llvm::codeview::PointerRecord &pr); +  lldb::TypeSP CreateSimpleType(llvm::codeview::TypeIndex ti); +  lldb::TypeSP CreateTagType(PdbSymUid type_uid, +                             const llvm::codeview::ClassRecord &cr); +  lldb::TypeSP CreateTagType(PdbSymUid type_uid, +                             const llvm::codeview::EnumRecord &er); +  lldb::TypeSP CreateTagType(PdbSymUid type_uid, +                             const llvm::codeview::UnionRecord &ur); +  lldb::TypeSP +  CreateClassStructUnion(PdbSymUid type_uid, llvm::StringRef name, size_t size, +                         clang::TagTypeKind ttk, +                         clang::MSInheritanceAttr::Spelling inheritance); +    lldb::FunctionSP GetOrCreateFunction(PdbSymUid func_uid,                                         const SymbolContext &sc);    lldb::CompUnitSP GetOrCreateCompileUnit(const CompilandIndexItem &cci); +  lldb::TypeSP GetOrCreateType(PdbSymUid type_uid); +  lldb::TypeSP GetOrCreateType(llvm::codeview::TypeIndex ti);    lldb::FunctionSP CreateFunction(PdbSymUid func_uid, const SymbolContext &sc);    lldb::CompUnitSP CreateCompileUnit(const CompilandIndexItem &cci); +  lldb::TypeSP CreateType(PdbSymUid type_uid); +  lldb::TypeSP CreateAndCacheType(PdbSymUid type_uid);    llvm::BumpPtrAllocator m_allocator;    lldb::addr_t m_obj_load_address = 0;    std::unique_ptr<PdbIndex> m_index; +  std::unique_ptr<ClangASTImporter> m_importer; +  ClangASTContext *m_clang = nullptr; + +  llvm::DenseMap<clang::TagDecl *, DeclStatus> m_decl_to_status; + +  llvm::DenseMap<lldb::user_id_t, clang::TagDecl *> m_uid_to_decl;    llvm::DenseMap<lldb::user_id_t, lldb::FunctionSP> m_functions;    llvm::DenseMap<lldb::user_id_t, lldb::CompUnitSP> m_compilands; +  llvm::DenseMap<lldb::user_id_t, lldb::TypeSP> m_types;  };  } // namespace npdb | 

