Path: blob/main/contrib/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
39645 views
//===-- DWARFASTParser.h ----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H9#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H1011#include "DWARFDefines.h"12#include "lldb/Core/PluginInterface.h"13#include "lldb/Symbol/SymbolFile.h"14#include "lldb/Symbol/CompilerDecl.h"15#include "lldb/Symbol/CompilerDeclContext.h"16#include "lldb/lldb-enumerations.h"17#include <optional>1819namespace lldb_private {20class CompileUnit;21class ExecutionContext;22}2324namespace lldb_private::plugin {25namespace dwarf {26class DWARFDIE;27class SymbolFileDWARF;2829class DWARFASTParser {30public:31enum class Kind { DWARFASTParserClang };32DWARFASTParser(Kind kind) : m_kind(kind) {}3334virtual ~DWARFASTParser() = default;3536virtual lldb::TypeSP ParseTypeFromDWARF(const SymbolContext &sc,37const DWARFDIE &die,38bool *type_is_new_ptr) = 0;3940virtual ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die) = 0;4142virtual Function *ParseFunctionFromDWARF(CompileUnit &comp_unit,43const DWARFDIE &die,44const AddressRange &range) = 0;4546virtual bool CompleteTypeFromDWARF(const DWARFDIE &die, Type *type,47CompilerType &compiler_type) = 0;4849virtual CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die) = 0;5051virtual CompilerDeclContext52GetDeclContextForUIDFromDWARF(const DWARFDIE &die) = 0;5354virtual CompilerDeclContext55GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) = 0;5657virtual void EnsureAllDIEsInDeclContextHaveBeenParsed(58CompilerDeclContext decl_context) = 0;5960virtual std::string GetDIEClassTemplateParams(const DWARFDIE &die) = 0;6162static std::optional<SymbolFile::ArrayInfo>63ParseChildArrayInfo(const DWARFDIE &parent_die,64const ExecutionContext *exe_ctx = nullptr);6566lldb_private::Type *GetTypeForDIE(const DWARFDIE &die);6768static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility);6970Kind GetKind() const { return m_kind; }7172private:73const Kind m_kind;74};75} // namespace dwarf76} // namespace lldb_private::plugin7778#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H798081