retdec
retdec.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_RETDEC_RETDEC_H
8 #define RETDEC_RETDEC_RETDEC_H
9 
10 #include <capstone/capstone.h>
11 #include <llvm/IR/LLVMContext.h>
12 #include <llvm/IR/Module.h>
13 
15 #include "retdec/common/function.h"
16 #include "retdec/config/config.h"
17 
18 namespace retdec {
19 
21 {
24  {
25  // Order matters: module destructor uses context.
26  module.reset();
27  context.reset();
28  }
29  std::unique_ptr<llvm::Module> module;
30  std::unique_ptr<llvm::LLVMContext> context;
31 };
32 
40  const std::string& inputPath,
41  retdec::common::FunctionSet* fs = nullptr
42 );
43 
49 bool decompile(
50  retdec::config::Config& config,
51  std::string* outString = nullptr
52 );
53 
54 } // namespace retdec
55 
56 #endif
Definition: function.h:224
Definition: config.h:30
Common basic block representation.
Common function representation.
Decompilation configuration manipulation.
Definition: archive_wrapper.h:19
LlvmModuleContextPair disassemble(const std::string &inputPath, retdec::common::FunctionSet *fs=nullptr)
Definition: retdec.cpp:301
bool decompile(retdec::config::Config &config, std::string *outString=nullptr)
Definition: retdec.cpp:463
Definition: retdec.h:21
LlvmModuleContextPair(LlvmModuleContextPair &&)=default
std::unique_ptr< llvm::LLVMContext > context
Definition: retdec.h:30
~LlvmModuleContextPair()
Definition: retdec.h:23
std::unique_ptr< llvm::Module > module
Definition: retdec.h:29