blob: 7466dec33510bf29738662a690a8d6325aaaac17 [file] [edit]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file defines the DWARF AST parser for the Fortran language.
///
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERFORTRAN_H
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERFORTRAN_H
#include "DWARFASTParser.h"
#include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
#include "Plugins/TypeSystem/Fortran/TypeSystemFortran.h"
namespace lldb_private {
class CompileUnit;
class ExecutionContext;
} // namespace lldb_private
class DWARFASTParserFortran
: public lldb_private::plugin::dwarf::DWARFASTParser {
public:
DWARFASTParserFortran(lldb_private::TypeSystemFortran &m_ast);
~DWARFASTParserFortran() override;
// LLVM RTTI support
static bool classof(const DWARFASTParser *Parser) {
return Parser->GetKind() == Kind::DWARFASTParserFortran;
}
/// If \p type_sp is valid, calculate and set its symbol context scope, and
/// update the type list for its backing symbol file.
///
/// Returns \p type_sp.
lldb::TypeSP UpdateSymbolContextScopeForType(
const lldb_private::SymbolContext &sc,
const lldb_private::plugin::dwarf::DWARFDIE &die, lldb::TypeSP type_sp);
void ParseFunctionParameters(
const lldb_private::plugin::dwarf::DWARFDIE &function_die,
llvm::SmallVectorImpl<lldb_private::CompilerType> &param_types,
llvm::SmallVectorImpl<llvm::StringRef> &param_names);
lldb::TypeSP
ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
const lldb_private::plugin::dwarf::DWARFDIE &die,
bool *type_is_new_ptr) override;
lldb_private::Function *
ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
const lldb_private::plugin::dwarf::DWARFDIE &die,
lldb_private::AddressRanges ranges) override;
bool CompleteTypeFromDWARF(
const lldb_private::plugin::dwarf::DWARFDIE &die,
lldb_private::Type *type,
const lldb_private::CompilerType &compiler_type) override;
lldb_private::ConstString ConstructDemangledNameFromDWARF(
const lldb_private::plugin::dwarf::DWARFDIE &die) override {
return lldb_private::ConstString();
}
lldb_private::CompilerDecl GetDeclForUIDFromDWARF(
const lldb_private::plugin::dwarf::DWARFDIE &die) override {
return lldb_private::CompilerDecl();
}
lldb_private::CompilerDeclContext GetDeclContextForUIDFromDWARF(
const lldb_private::plugin::dwarf::DWARFDIE &die) override {
return lldb_private::CompilerDeclContext();
}
lldb_private::CompilerDeclContext GetDeclContextContainingUIDFromDWARF(
const lldb_private::plugin::dwarf::DWARFDIE &die) override {
return lldb_private::CompilerDeclContext();
}
void EnsureAllDIEsInDeclContextHaveBeenParsed(
lldb_private::CompilerDeclContext decl_context) override {}
std::string GetDIEClassTemplateParams(
lldb_private::plugin::dwarf::DWARFDIE die) override {
return {};
}
private:
lldb_private::TypeSystemFortran &m_ast;
};
#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERFORTRAN_H