retdec
api_call_seq_finder.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_PATTERN_PATTERN_FINDERS_API_CALL_API_CALL_SEQ_FINDER_H
8 #define RETDEC_LLVMIR2HLL_PATTERN_PATTERN_FINDERS_API_CALL_API_CALL_SEQ_FINDER_H
9 
10 #include <vector>
11 
15 
16 namespace retdec {
17 namespace llvmir2hll {
18 
19 class CallExpr;
20 class CallInfoObtainer;
21 class Module;
22 class Pattern;
23 class Statement;
24 class ValueAnalysis;
25 
34 public:
36  using Patterns = std::vector<ShPtr<Pattern>>;
37 
38 public:
39  virtual ~APICallSeqFinder() = default;
40 
56  virtual Patterns findPatterns(const APICallInfoSeq &info,
58  ShPtr<Module> module) = 0;
59 
60 protected:
62 
63 protected:
66 
69 };
70 
71 } // namespace llvmir2hll
72 } // namespace retdec
73 
74 #endif
A sequence of information about API calls.
A sequence of information about API calls.
Definition: api_call_info_seq.h:21
A base class for all API calls finders.
Definition: api_call_seq_finder.h:33
ShPtr< CallInfoObtainer > cio
The used call info obtainer.
Definition: api_call_seq_finder.h:68
ShPtr< ValueAnalysis > va
Analysis of values.
Definition: api_call_seq_finder.h:65
virtual Patterns findPatterns(const APICallInfoSeq &info, ShPtr< CallExpr > call, ShPtr< Statement > stmt, ShPtr< Function > func, ShPtr< Module > module)=0
Tries to find the given sequence of API calls, starting at stmt.
APICallSeqFinder(ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
Constructs the base class.
Definition: api_call_seq_finder.cpp:26
std::vector< ShPtr< Pattern > > Patterns
List of patterns.
Definition: api_call_seq_finder.h:36
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
ShPtr< Module > module
The current module.
Definition: hll_writer.cpp:100
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.