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

#include <idioms_libgcc.h>

Inheritance diagram for retdec::bin2llvmir::IdiomsLibgcc:
Inheritance graph
[legend]
Collaboration diagram for retdec::bin2llvmir::IdiomsLibgcc:
Collaboration graph
[legend]

Public Types

using Fnc2Action = std::vector< std::pair< std::string, std::function< void(llvm::CallInst *)> >>
 

Public Member Functions

 IdiomsLibgcc ()
 
virtual bool runOnModule (llvm::Module &M) override
 
bool runOnModuleCustom (llvm::Module &M, Config *c, Abi *abi)
 

Static Public Member Functions

static bool checkFunctionToActionMap (const Fnc2Action &fnc2action)
 

Static Public Attributes

static char ID = 0
 

Private Member Functions

bool run ()
 
bool runInstruction (llvm::Instruction *inst)
 

Private Attributes

std::unique_ptr< IdiomsLibgccImpl_impl
 
llvm::Module * _module = nullptr
 
Config_config = nullptr
 
Abi_abi = nullptr
 
Fnc2Action _fnc2action
 

Member Typedef Documentation

◆ Fnc2Action

using retdec::bin2llvmir::IdiomsLibgcc::Fnc2Action = std::vector< std::pair<std::string, std::function<void(llvm::CallInst*)> >>

Constructor & Destructor Documentation

◆ IdiomsLibgcc()

retdec::bin2llvmir::IdiomsLibgcc::IdiomsLibgcc ( )

Member Function Documentation

◆ checkFunctionToActionMap()

bool retdec::bin2llvmir::IdiomsLibgcc::checkFunctionToActionMap ( const Fnc2Action fnc2action)
static

Check the given container for element ordering problems. Entries in the container are tried to be applied from first to last. Function ID of any element can not be contained in any later element, otherwise later would never be applied.

Parameters
fnc2actionThis method could access _fnc2action directly, but we want to unit test it with custom container.
Returns
True if problem in map found, false otherwise.
Note
Method is static so it can be easily used in unit tests.

◆ run()

bool retdec::bin2llvmir::IdiomsLibgcc::run ( )
private

◆ runInstruction()

bool retdec::bin2llvmir::IdiomsLibgcc::runInstruction ( llvm::Instruction *  inst)
private

◆ runOnModule()

bool retdec::bin2llvmir::IdiomsLibgcc::runOnModule ( llvm::Module &  M)
overridevirtual

◆ runOnModuleCustom()

bool retdec::bin2llvmir::IdiomsLibgcc::runOnModuleCustom ( llvm::Module &  M,
Config c,
Abi abi 
)

Member Data Documentation

◆ _abi

Abi* retdec::bin2llvmir::IdiomsLibgcc::_abi = nullptr
private

◆ _config

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

◆ _fnc2action

Fnc2Action retdec::bin2llvmir::IdiomsLibgcc::_fnc2action
private

◆ _impl

std::unique_ptr<IdiomsLibgccImpl> retdec::bin2llvmir::IdiomsLibgcc::_impl
private

◆ _module

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

◆ ID

char retdec::bin2llvmir::IdiomsLibgcc::ID = 0
static

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