7 #ifndef RETDEC_LLVMIR2HLL_IR_FUNCTION_BUILDER_H
8 #define RETDEC_LLVMIR2HLL_IR_FUNCTION_BUILDER_H
A builder providing a simple way of creating functions.
Definition: function_builder.h:45
FunctionBuilder & withParam(ShPtr< Variable > param)
Adds the given parameter to the function.
Definition: function_builder.cpp:105
ShPtr< Function > func
A function that is being built.
Definition: function_builder.h:66
FunctionBuilder & definitionWithBody(ShPtr< Statement > body)
Makes the function a definition with the given body.
Definition: function_builder.cpp:63
FunctionBuilder(const std::string &funcName="")
Constructs a builder providing the default function named funcName.
Definition: function_builder.cpp:40
FunctionBuilder & definitionWithEmptyBody()
Makes the function a definition with an empty body.
Definition: function_builder.cpp:49
ShPtr< Function > build()
Returns the built function.
Definition: function_builder.cpp:77
FunctionBuilder & withRetType(ShPtr< Type > retType)
Makes the function to have the given return type.
Definition: function_builder.cpp:90
FunctionBuilder & withLocalVar(ShPtr< Variable > var)
Adds the given local variable to the function.
Definition: function_builder.cpp:120
FunctionBuilder & withVarArg()
Makes the function taking a variable number of arguments.
Definition: function_builder.cpp:134
ShPtr< Function > releaseFuncAndInvalidateBuilder()
Releases the built function and invalidates the builder.
Definition: function_builder.cpp:144
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
A mixin to make classes non-copyable.
Declarations, aliases, macros, etc. for the use of smart pointers.