retdec
Public Member Functions | Private Member Functions | List of all members
retdec::demangler::ItaniumAstCtypesParser Class Reference

#include <itanium_ast_ctypes_parser.h>

Inheritance diagram for retdec::demangler::ItaniumAstCtypesParser:
Inheritance graph
[legend]
Collaboration diagram for retdec::demangler::ItaniumAstCtypesParser:
Collaboration graph
[legend]

Public Member Functions

 ItaniumAstCtypesParser ()=default
 
std::shared_ptr< ctypes::FunctionparseAsFunction (const std::string &name, const llvm::itanium_demangle::Node *ast, std::unique_ptr< ctypes::Module > &module, const TypeWidths &typeWidths={}, const TypeSignedness &typeSignedness={}, unsigned defaultBitWidth=0)
 
- Public Member Functions inherited from retdec::demangler::AstToCtypesParser
 AstToCtypesParser ()=default
 
- Public Member Functions inherited from retdec::ctypesparser::CTypesParser
virtual ~CTypesParser ()=default
 

Private Member Functions

std::shared_ptr< ctypes::FunctionparseFunction (const std::string &mangledName, const llvm::itanium_demangle::FunctionEncoding *functionEncodingNode)
 
ctypes::Function::Parameters parseFunctionParameters (llvm::itanium_demangle::NodeArray node, bool &isVarArg)
 
std::shared_ptr< ctypes::TypeparseType (const llvm::itanium_demangle::Node *typeNode)
 
std::shared_ptr< ctypes::IntegralTypeparseIntegralType (const std::string &name)
 
std::shared_ptr< ctypes::FloatingPointTypeparseFloatingPointType (const std::string &name)
 
std::shared_ptr< ctypes::PointerTypeparsePointer (const llvm::itanium_demangle::PointerType *typeNode)
 
std::shared_ptr< ctypes::TypeparseReference (const llvm::itanium_demangle::ReferenceType *typeNode)
 
std::shared_ptr< ctypes::TypeparseNameTypeNode (const llvm::itanium_demangle::NameType *typeNode)
 
std::shared_ptr< ctypes::ArrayTypeparseArrayType (const llvm::itanium_demangle::ArrayType *typeNode)
 
unsigned parseDimension (const llvm::itanium_demangle::NodeOrString *dimensions)
 
std::shared_ptr< ctypes::FunctionTypeparseFuntionType (const llvm::itanium_demangle::FunctionType *typeNode)
 
ctypes::FunctionType::Parameters parseFuncTypeParameters (llvm::itanium_demangle::NodeArray parameters, bool &isVarArg)
 

Additional Inherited Members

- Public Types inherited from retdec::ctypesparser::CTypesParser
using TypeWidths = std::map< std::string, unsigned >
 Set container for C-types' bit width. More...
 
using TypeSignedness = std::map< std::string, ctypes::IntegralType::Signess >
 Set container for C-types' signedness. More...
 
- Protected Member Functions inherited from retdec::demangler::AstToCtypesParser
unsigned getBitWidth (const std::string &typeName) const
 
ctypes::IntegralType::Signess toSigness (bool isUnsigned) const
 
ctypes::IntegralType::Signess toSigness (const std::string &typeName) const
 
ctypes::FunctionType::VarArgness toVarArgness (bool isVarArg) const
 
- Protected Member Functions inherited from retdec::ctypesparser::CTypesParser
 CTypesParser ()
 Creates new C-types parser. More...
 
 CTypesParser (unsigned defaultBitWidth)
 Creates new C-types parser. More...
 
- Protected Attributes inherited from retdec::ctypesparser::CTypesParser
std::shared_ptr< retdec::ctypes::Contextcontext
 Container for already parsed functions, types. More...
 
TypeWidths typeWidths
 C-types' bit widths. More...
 
TypeSignedness typeSignedness
 C-types' signedness. More...
 
unsigned defaultBitWidth = 0
 Bitwidth used for types not in typeWidths. More...
 

Constructor & Destructor Documentation

◆ ItaniumAstCtypesParser()

retdec::demangler::ItaniumAstCtypesParser::ItaniumAstCtypesParser ( )
default

Member Function Documentation

◆ parseArrayType()

std::shared_ptr< ctypes::ArrayType > retdec::demangler::ItaniumAstCtypesParser::parseArrayType ( const llvm::itanium_demangle::ArrayType *  typeNode)
private

◆ parseAsFunction()

std::shared_ptr< ctypes::Function > retdec::demangler::ItaniumAstCtypesParser::parseAsFunction ( const std::string &  name,
const llvm::itanium_demangle::Node *  ast,
std::unique_ptr< ctypes::Module > &  module,
const TypeWidths typeWidths = {},
const TypeSignedness typeSignedness = {},
unsigned  defaultBitWidth = 0 
)

◆ parseDimension()

unsigned retdec::demangler::ItaniumAstCtypesParser::parseDimension ( const llvm::itanium_demangle::NodeOrString *  dimensions)
private

◆ parseFloatingPointType()

std::shared_ptr< ctypes::FloatingPointType > retdec::demangler::ItaniumAstCtypesParser::parseFloatingPointType ( const std::string &  name)
private

◆ parseFunction()

std::shared_ptr< ctypes::Function > retdec::demangler::ItaniumAstCtypesParser::parseFunction ( const std::string &  mangledName,
const llvm::itanium_demangle::FunctionEncoding *  functionEncodingNode 
)
private

◆ parseFunctionParameters()

ctypes::Function::Parameters retdec::demangler::ItaniumAstCtypesParser::parseFunctionParameters ( llvm::itanium_demangle::NodeArray  node,
bool &  isVarArg 
)
private

◆ parseFuncTypeParameters()

ctypes::FunctionType::Parameters retdec::demangler::ItaniumAstCtypesParser::parseFuncTypeParameters ( llvm::itanium_demangle::NodeArray  parameters,
bool &  isVarArg 
)
private

◆ parseFuntionType()

std::shared_ptr< ctypes::FunctionType > retdec::demangler::ItaniumAstCtypesParser::parseFuntionType ( const llvm::itanium_demangle::FunctionType *  typeNode)
private

◆ parseIntegralType()

std::shared_ptr< ctypes::IntegralType > retdec::demangler::ItaniumAstCtypesParser::parseIntegralType ( const std::string &  name)
private

◆ parseNameTypeNode()

std::shared_ptr< ctypes::Type > retdec::demangler::ItaniumAstCtypesParser::parseNameTypeNode ( const llvm::itanium_demangle::NameType *  typeNode)
private

◆ parsePointer()

std::shared_ptr< ctypes::PointerType > retdec::demangler::ItaniumAstCtypesParser::parsePointer ( const llvm::itanium_demangle::PointerType *  typeNode)
private

◆ parseReference()

std::shared_ptr< ctypes::Type > retdec::demangler::ItaniumAstCtypesParser::parseReference ( const llvm::itanium_demangle::ReferenceType *  typeNode)
private

◆ parseType()

std::shared_ptr< ctypes::Type > retdec::demangler::ItaniumAstCtypesParser::parseType ( const llvm::itanium_demangle::Node *  typeNode)
private

The documentation for this class was generated from the following files: