retdec
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
retdec::bin2llvmir::Lti Class Reference

#include <lti.h>

Collaboration diagram for retdec::bin2llvmir::Lti:
Collaboration graph
[legend]

Public Types

using FunctionPair = std::pair< llvm::Function *, std::shared_ptr< retdec::ctypes::Function > >
 

Public Member Functions

 Lti (llvm::Module *m, Config *c, const std::shared_ptr< ctypesparser::TypeConfig > &typeConfig, retdec::loader::Image *objf)
 
bool hasLtiFunction (const std::string &name)
 
std::shared_ptr< retdec::ctypes::FunctiongetLtiFunction (const std::string &name)
 
llvm::FunctionType * getLlvmFunctionType (const std::string &name)
 
FunctionPair getPairFunctionFree (const std::string &name)
 
llvm::Function * getLlvmFunctionFree (const std::string &name)
 
FunctionPair getPairFunction (const std::string &name)
 
llvm::Function * getLlvmFunction (const std::string &name)
 

Private Member Functions

void loadLtiFile (const std::string &filePath)
 
llvm::Type * getLlvmType (std::shared_ptr< retdec::ctypes::Type > type)
 

Private Attributes

llvm::Module * _module = nullptr
 
Config_config = nullptr
 
std::shared_ptr< ctypesparser::TypeConfig_typeConfig
 
retdec::loader::Image_image = nullptr
 
std::unique_ptr< retdec::ctypes::Module_ltiModule
 
ctypesparser::JSONCTypesParser _ltiParser
 

Member Typedef Documentation

◆ FunctionPair

using retdec::bin2llvmir::Lti::FunctionPair = std::pair< llvm::Function*, std::shared_ptr<retdec::ctypes::Function> >

Constructor & Destructor Documentation

◆ Lti()

retdec::bin2llvmir::Lti::Lti ( llvm::Module *  m,
Config c,
const std::shared_ptr< ctypesparser::TypeConfig > &  typeConfig,
retdec::loader::Image objf 
)

Member Function Documentation

◆ getLlvmFunction()

llvm::Function * retdec::bin2llvmir::Lti::getLlvmFunction ( const std::string &  name)

◆ getLlvmFunctionFree()

llvm::Function * retdec::bin2llvmir::Lti::getLlvmFunctionFree ( const std::string &  name)

◆ getLlvmFunctionType()

llvm::FunctionType * retdec::bin2llvmir::Lti::getLlvmFunctionType ( const std::string &  name)

Find LTI function with name and get its LLVM type.

Parameters
[in]nameFunction name to find.
Returns
LLVM function type for name, or nullptr if not found.

◆ getLlvmType()

llvm::Type * retdec::bin2llvmir::Lti::getLlvmType ( std::shared_ptr< retdec::ctypes::Type type)
private

◆ getLtiFunction()

std::shared_ptr< retdec::ctypes::Function > retdec::bin2llvmir::Lti::getLtiFunction ( const std::string &  name)

◆ getPairFunction()

Lti::FunctionPair retdec::bin2llvmir::Lti::getPairFunction ( const std::string &  name)

◆ getPairFunctionFree()

Lti::FunctionPair retdec::bin2llvmir::Lti::getPairFunctionFree ( const std::string &  name)

◆ hasLtiFunction()

bool retdec::bin2llvmir::Lti::hasLtiFunction ( const std::string &  name)

◆ loadLtiFile()

void retdec::bin2llvmir::Lti::loadLtiFile ( const std::string &  filePath)
private

Member Data Documentation

◆ _config

Config* retdec::bin2llvmir::Lti::_config = nullptr
private

◆ _image

retdec::loader::Image* retdec::bin2llvmir::Lti::_image = nullptr
private

◆ _ltiModule

std::unique_ptr<retdec::ctypes::Module> retdec::bin2llvmir::Lti::_ltiModule
private

◆ _ltiParser

ctypesparser::JSONCTypesParser retdec::bin2llvmir::Lti::_ltiParser
private

◆ _module

llvm::Module* retdec::bin2llvmir::Lti::_module = nullptr
private

◆ _typeConfig

std::shared_ptr<ctypesparser::TypeConfig> retdec::bin2llvmir::Lti::_typeConfig
private

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