retdec
Namespaces | Macros | Functions
get_c_header_file_for_func.h File Reference

Support for implementing the getCHeaderFileForFunc semantics. More...

#include <cstddef>
#include <optional>
#include "retdec/llvmir2hll/support/types.h"
#include "retdec/utils/array.h"

Go to the source code of this file.

Namespaces

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

Macros

#define ADD_FUNCS_TO_C_HEADER_MAP(funcs, header, map)
 Maps all the functions from array funcs into header by adding them into map. More...
 

Functions

std::optional< std::string > retdec::llvmir2hll::semantics::getCHeaderFileForFuncFromMap (const std::string &funcName, const StringStringUMap &map)
 Returns the header name for the given function from the given map. More...
 

Detailed Description

Support for implementing the getCHeaderFileForFunc semantics.

Macro Definition Documentation

◆ ADD_FUNCS_TO_C_HEADER_MAP

#define ADD_FUNCS_TO_C_HEADER_MAP (   funcs,
  header,
  map 
)
Value:
for (std::size_t i = 0, e = retdec::utils::arraySize(funcs); i != e; ++i) { \
map[funcs[i]] = header; \
}
constexpr std::size_t arraySize(T(&)[N]) noexcept
Returns the number of elements of the given array as a compile-time constant.
Definition: array.h:28

Maps all the functions from array funcs into header by adding them into map.

Parameters
[in]funcsStatically allocated array of function names (const char *).
[in]headerThe name of the header file (const char *).
[out]mapA map into which the mappings will be stored.