52 return std::make_shared<TypeSystemFortran>();
74 return !type || llvm::isa<FortranType>(
static_cast<FortranType *
>(type));
114 switch (fortran_type->
GetKind()) {
120 return fortran_type->
GetName();
131 const char *default_name =
nullptr;
133 switch (dwarf_encoding) {
134 case dwarf::DW_ATE_boolean:
136 default_name =
"LOGICAL";
138 case dwarf::DW_ATE_float:
140 default_name =
"REAL";
142 case dwarf::DW_ATE_signed:
143 case dwarf::DW_ATE_signed_char:
145 default_name =
"INTEGER";
148 case dwarf::DW_ATE_unsigned:
150 default_name =
"UNSIGNED";
152 case dwarf::DW_ATE_complex_float:
154 default_name =
"COMPLEX";
161 if (name.
IsEmpty() && default_name)
174 FoldingSetInsertToken token;
177 return CompilerType(weak_from_this(), (
void *)candidate_type);
179 auto new_type_up = std::make_unique<FortranType>(kind, bitsize, name);
180 candidate_type = new_type_up.get();
182 m_types.push_back(std::move(new_type_up));
183 return CompilerType(weak_from_this(), (
void *)candidate_type);
188 return type ? lldb::eTypeClassBuiltin : lldb::eTypeClassInvalid;
212 switch (fortran_type->
GetKind()) {
277 switch (basic_type) {
This file defines the DWARF AST parser for the Fortran language.
This file defines the classes that describe the Fortran types.
#define LLDB_PLUGIN_DEFINE(PluginName)
uint32_t GetKind(uint32_t data)
Return the type kind encoded in the given data.
Generic representation of a type in a programming language.
A uniqued constant string class.
void SetCString(const char *cstr)
Set the C string value.
bool IsEmpty() const
Test for empty string.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
static bool LanguageIsFortran(lldb::LanguageType language)
A class that describes an executable image and its associated object and symbol files.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language, Module *module, Target *target)
bool IsIntegerType(lldb::opaque_compiler_type_t type, bool &is_signed) override
plugin::dwarf::DWARFASTParser * GetDWARFParser() override
bool IsFloatingPointType(lldb::opaque_compiler_type_t type) override
llvm::SmallVector< std::unique_ptr< plugin::fortran::FortranType > > m_types
static LanguageSet GetSupportedLanguagesForExpressions()
ConstString GetTypeName(lldb::opaque_compiler_type_t type, bool BaseOnly) override
Returns the type name upper-cased to follow Fortran's general style.
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) override
llvm::FoldingSet< plugin::fortran::FortranType > m_basic_types
CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override
static LanguageSet GetSupportedLanguagesForTypes()
lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) override
CompilerType GetOrCreateFortranBaseType(int kind, uint64_t bitsize, ConstString name)
Creates the type if it has not been created before, otherwise it gets it from the type map.
CompilerType CreateBaseType(llvm::dwarf::TypeKind dwarf_encoding, uint64_t bitsize, ConstString name)
CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size) override
bool SupportsLanguage(lldb::LanguageType language) override
static llvm::StringRef GetPluginNameStatic()
std::unique_ptr< plugin::dwarf::DWARFASTParser > m_dwarf_ast_parser_up
lldb::BasicType GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override
bool Verify(lldb::opaque_compiler_type_t type) override
Verify the integrity of the type to catch CompilerTypes that mix and match invalid TypeSystem/Opaque ...
llvm::Expected< uint64_t > GetBitSize(lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) override
A simplified internal representation of a Fortran type.
void Profile(llvm::FoldingSetNodeID &ID) const
ConstString GetName() const
uint64_t GetBitSize() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::TypeSystem > TypeSystemSP
void * opaque_compiler_type_t
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
@ eBasicTypeUnsignedShort
@ eBasicTypeUnsignedInt128
@ eBasicTypeUnsignedLongLong
@ eBasicTypeDoubleComplex
LanguageType
Programming language type.
@ eLanguageTypeFortran08
ISO Fortran 2008.
@ eLanguageTypeFortran95
ISO Fortran 95.
@ eLanguageTypeFortran77
ISO Fortran 77.
@ eLanguageTypeFortran90
ISO Fortran 90.
@ eLanguageTypeFortran03
ISO Fortran 2003.
Encoding
Register encoding definitions.
@ eEncodingUint
unsigned integer
@ eEncodingSint
signed integer
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
void Insert(lldb::LanguageType language)