retdec
get_c_header_file_for_func.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_SEMANTICS_SEMANTICS_IMPL_SUPPORT_GET_C_HEADER_FILE_FOR_FUNC_H
8 #define RETDEC_LLVMIR2HLL_SEMANTICS_SEMANTICS_IMPL_SUPPORT_GET_C_HEADER_FILE_FOR_FUNC_H
9 
10 #include <cstddef>
11 #include <optional>
12 
14 #include "retdec/utils/array.h"
15 
25 #define ADD_FUNCS_TO_C_HEADER_MAP(funcs, header, map) \
26  for (std::size_t i = 0, e = retdec::utils::arraySize(funcs); i != e; ++i) { \
27  map[funcs[i]] = header; \
28  }
29 
30 namespace retdec {
31 namespace llvmir2hll {
32 namespace semantics {
33 
34 std::optional<std::string> getCHeaderFileForFuncFromMap(
35  const std::string &funcName,
36  const StringStringUMap &map);
37 
38 } // namespace semantics
39 } // namespace llvmir2hll
40 } // namespace retdec
41 
42 #endif
Array utilities.
A library providing API for working with back-end IR.
std::optional< std::string > getCHeaderFileForFuncFromMap(const std::string &funcName, const StringStringUMap &map)
Returns the header name for the given function from the given map.
Definition: get_c_header_file_for_func.cpp:16
std::unordered_map< std::string, std::string > StringStringUMap
Unordered mapping of a string into a string.
Definition: types.h:141
Definition: archive_wrapper.h:19
Aliases for several useful types.