retdec
Namespaces | Functions | Variables
llvmir2hll.cpp File Reference
#include <algorithm>
#include <fstream>
#include <memory>
#include "retdec/llvmir2hll/llvmir2hll.h"
#include "retdec/utils/io/log.h"

Namespaces

 retdec
 
 retdec::llvmir2hll
 

Functions

std::unique_ptr< llvm::ToolOutputFile > getOutputStream (const std::string &outputFile)
 
template<typename FactoryType >
std::string getListOfSupportedObjects ()
 Returns a list of all supported objects by the given factory. More...
 
template<typename FactoryType >
void printErrorUnsupportedObject (const std::string &typeOfObjectsSingular, const std::string &typeOfObjectsPlural)
 Prints an error message concerning the situation when an unsupported object has been selected from the given factory. More...
 
static RegisterPass< LlvmIr2Hll > retdec::llvmir2hll::X ("retdec-llvmir2hll", "LLVM IR -> HLL", false, false)
 

Variables

std::string TargetHLL = "c"
 
std::string oArithmExprEvaluator = "c"
 
bool ValidateModule = true
 
bool StrictFPUSemantics = false
 
std::string ForcedModuleName = ""
 
bool Debug = true
 
bool EmitDebugComments = true
 
std::string oCFGWriter = "dot"
 
std::string oCGWriter = "dot"
 
std::string VarNameGenPrefix = ""
 
std::string oVarNameGen = "fruit"
 
std::string oAliasAnalysis = "simple"
 
std::string FindPatterns = ""
 
std::string oSemantics = ""
 

Function Documentation

◆ getListOfSupportedObjects()

template<typename FactoryType >
std::string getListOfSupportedObjects ( )

Returns a list of all supported objects by the given factory.

Template Parameters
FactoryTypeType of the factory in whose objects we are interested in.

The list is comma separated and has no beginning or trailing whitespace.

◆ getOutputStream()

std::unique_ptr<llvm::ToolOutputFile> getOutputStream ( const std::string &  outputFile)

◆ printErrorUnsupportedObject()

template<typename FactoryType >
void printErrorUnsupportedObject ( const std::string &  typeOfObjectsSingular,
const std::string &  typeOfObjectsPlural 
)

Prints an error message concerning the situation when an unsupported object has been selected from the given factory.

Parameters
[in]typeOfObjectsSingularA human-readable description of the type of objects the factory provides. In the singular form, e.g. "HLL writer".
[in]typeOfObjectsPluralA human-readable description of the type of objects the factory provides. In the plural form, e.g. "HLL writers".
Template Parameters
FactoryTypeType of the factory in whose objects we are interested in.

Variable Documentation

◆ Debug

bool Debug = true

◆ EmitDebugComments

bool EmitDebugComments = true

◆ FindPatterns

std::string FindPatterns = ""

◆ ForcedModuleName

std::string ForcedModuleName = ""

◆ oAliasAnalysis

std::string oAliasAnalysis = "simple"

◆ oArithmExprEvaluator

std::string oArithmExprEvaluator = "c"

◆ oCFGWriter

std::string oCFGWriter = "dot"

◆ oCGWriter

std::string oCGWriter = "dot"

◆ oSemantics

std::string oSemantics = ""

◆ oVarNameGen

std::string oVarNameGen = "fruit"

◆ StrictFPUSemantics

bool StrictFPUSemantics = false

◆ TargetHLL

std::string TargetHLL = "c"

◆ ValidateModule

bool ValidateModule = true

◆ VarNameGenPrefix

std::string VarNameGenPrefix = ""