retdec
Classes | Namespaces | Macros | Typedefs | Functions
get_name_of_param.h File Reference

Support for implementing the getNameOfParam semantics. More...

#include <cstddef>
#include <optional>
#include <string>
#include <unordered_map>

Go to the source code of this file.

Classes

struct  retdec::llvmir2hll::semantics::FuncParamPosPairHasher
 A hashing functor for FuncParamPosPair. More...
 

Namespaces

 retdec
 
 retdec::llvmir2hll
 
 retdec::llvmir2hll::semantics
 Implementation of semantics.
 

Macros

#define ADD_PARAM_NAME(funcName, paramPos, paramName)    funcParamNamesMap[FuncParamPosPair(funcName, paramPos)] = paramName;
 Sets a name of the given parameter for the given function. More...
 

Typedefs

using retdec::llvmir2hll::semantics::FuncParamPosPair = std::pair< std::string, unsigned >
 A pair of function name and parameter position. More...
 
using retdec::llvmir2hll::semantics::FuncParamNamesMap = std::unordered_map< FuncParamPosPair, std::string, FuncParamPosPairHasher >
 

Functions

std::optional< std::string > retdec::llvmir2hll::semantics::getNameOfParamFromMap (const std::string &funcName, unsigned paramPos, const FuncParamNamesMap &map)
 Returns the name of the given parameter from the given map. More...
 

Detailed Description

Support for implementing the getNameOfParam semantics.

Macro Definition Documentation

◆ ADD_PARAM_NAME

#define ADD_PARAM_NAME (   funcName,
  paramPos,
  paramName 
)     funcParamNamesMap[FuncParamPosPair(funcName, paramPos)] = paramName;

Sets a name of the given parameter for the given function.