1 //===-- DWARFASTParser.h ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SymbolFileDWARF_DWARFASTParser_h_
11 #define SymbolFileDWARF_DWARFASTParser_h_
13 #include "DWARFDefines.h"
14 #include "lldb/Core/PluginInterface.h"
15 #include "lldb/Symbol/SymbolFile.h"
16 #include "lldb/Symbol/CompilerDecl.h"
17 #include "lldb/Symbol/CompilerDeclContext.h"
20 namespace lldb_private {
22 class ExecutionContext;
24 class SymbolFileDWARF;
26 class DWARFASTParser {
28 virtual ~DWARFASTParser() {}
30 virtual lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
32 lldb_private::Log *log,
33 bool *type_is_new_ptr) = 0;
35 virtual lldb_private::Function *
36 ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
37 const DWARFDIE &die) = 0;
40 CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
41 lldb_private::CompilerType &compiler_type) = 0;
43 virtual lldb_private::CompilerDecl
44 GetDeclForUIDFromDWARF(const DWARFDIE &die) = 0;
46 virtual lldb_private::CompilerDeclContext
47 GetDeclContextForUIDFromDWARF(const DWARFDIE &die) = 0;
49 virtual lldb_private::CompilerDeclContext
50 GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) = 0;
52 virtual std::vector<DWARFDIE>
53 GetDIEForDeclContext(lldb_private::CompilerDeclContext decl_context) = 0;
55 static llvm::Optional<lldb_private::SymbolFile::ArrayInfo>
56 ParseChildArrayInfo(const DWARFDIE &parent_die,
57 const lldb_private::ExecutionContext *exe_ctx = nullptr);
60 #endif // SymbolFileDWARF_DWARFASTParser_h_