retdec
pattern_finder.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_PATTERN_PATTERN_FINDER_H
8 #define RETDEC_LLVMIR2HLL_PATTERN_PATTERN_FINDER_H
9 
10 #include <string>
11 #include <vector>
12 
16 
17 namespace retdec {
18 namespace llvmir2hll {
19 
20 class Module;
21 class ValueAnalysis;
22 class CallInfoObtainer;
23 
39 public:
41  using Patterns = std::vector<ShPtr<Pattern>>;
42 
43 public:
44  virtual ~PatternFinder() = default;
45 
49  virtual const std::string getId() const = 0;
50 
55 
56 protected:
58 
59 protected:
62 
65 };
66 
67 } // namespace llvmir2hll
68 } // namespace retdec
69 
70 #endif
A base class for all pattern finders.
Definition: pattern_finder.h:38
std::vector< ShPtr< Pattern > > Patterns
A list of patterns.
Definition: pattern_finder.h:41
ShPtr< CallInfoObtainer > cio
The used call info obtainer.
Definition: pattern_finder.h:64
ShPtr< ValueAnalysis > va
Analysis of values.
Definition: pattern_finder.h:61
virtual const std::string getId() const =0
Returns the ID of the finder.
virtual Patterns findPatterns(ShPtr< Module > module)=0
Finds patterns in the given module and returns them.
PatternFinder(ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
Constructs a pattern finder.
Definition: pattern_finder.cpp:26
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
ShPtr< Module > module
The current module.
Definition: hll_writer.cpp:100
A base class for representing code patterns.
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.