]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h
MFV r337167: 9442 decrease indirect block size of spacemaps
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / SymbolFile / DWARF / DWARFASTParserGo.h
1 //===-- DWARFASTParserGo.h --------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef SymbolFileDWARF_DWARFASTParserGo_h_
11 #define SymbolFileDWARF_DWARFASTParserGo_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 #include "llvm/ADT/DenseMap.h"
17 #include "llvm/ADT/SmallPtrSet.h"
18 #include "llvm/ADT/SmallVector.h"
19
20 // Project includes
21 #include "DWARFASTParser.h"
22 #include "DWARFDIE.h"
23 #include "DWARFDefines.h"
24 #include "lldb/Core/PluginInterface.h"
25 #include "lldb/Symbol/GoASTContext.h"
26
27 class DWARFDebugInfoEntry;
28 class DWARFDIECollection;
29
30 class DWARFASTParserGo : public DWARFASTParser {
31 public:
32   DWARFASTParserGo(lldb_private::GoASTContext &ast);
33
34   ~DWARFASTParserGo() override;
35
36   lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
37                                   const DWARFDIE &die, lldb_private::Log *log,
38                                   bool *type_is_new_ptr) override;
39
40   lldb_private::Function *
41   ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
42                          const DWARFDIE &die) override;
43
44   bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
45                              lldb_private::CompilerType &go_type) override;
46
47   lldb_private::CompilerDeclContext
48   GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override {
49     return lldb_private::CompilerDeclContext();
50   }
51
52   lldb_private::CompilerDeclContext
53   GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override {
54     return lldb_private::CompilerDeclContext();
55   }
56
57   lldb_private::CompilerDecl
58   GetDeclForUIDFromDWARF(const DWARFDIE &die) override {
59     return lldb_private::CompilerDecl();
60   }
61
62   std::vector<DWARFDIE> GetDIEForDeclContext(
63       lldb_private::CompilerDeclContext decl_context) override {
64     return std::vector<DWARFDIE>();
65   }
66
67 private:
68   size_t ParseChildParameters(
69       const lldb_private::SymbolContext &sc, const DWARFDIE &parent_die,
70       bool &is_variadic,
71       std::vector<lldb_private::CompilerType> &function_param_types);
72   void ParseChildArrayInfo(const lldb_private::SymbolContext &sc,
73                            const DWARFDIE &parent_die, int64_t &first_index,
74                            std::vector<uint64_t> &element_orders,
75                            uint32_t &byte_stride, uint32_t &bit_stride);
76
77   size_t ParseChildMembers(const lldb_private::SymbolContext &sc,
78                            const DWARFDIE &die,
79                            lldb_private::CompilerType &class_compiler_type);
80
81   lldb_private::GoASTContext &m_ast;
82 };
83
84 #endif // SymbolFileDWARF_DWARFASTParserGo_h_