retdec
types.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_SUPPORT_TYPES_H
8 #define RETDEC_LLVMIR2HLL_SUPPORT_TYPES_H
9 
10 #include <cstdint>
11 #include <map>
12 #include <set>
13 #include <string>
14 #include <unordered_map>
15 #include <unordered_set>
16 #include <vector>
17 
19 #include "retdec/common/address.h"
20 
21 namespace retdec {
22 namespace llvmir2hll {
23 
24 class CallExpr;
25 class Expression;
26 class Function;
27 class GlobalVarDef;
28 class Statement;
29 class StructType;
30 class Type;
31 class Value;
32 class VarDefStmt;
33 class Variable;
34 
37 
40 
42 extern const AddressRange NO_ADDRESS_RANGE;
43 
45 using LineRange = std::pair<std::uint64_t, std::uint64_t>;
46 
48 extern const LineRange NO_LINE_RANGE;
49 
51 using StringSet = std::set<std::string>;
52 
54 using ValueSet = std::set<ShPtr<Value>>;
55 
57 using VarSet = std::set<ShPtr<Variable>>;
58 
60 using VarDefStmtSet = std::set<ShPtr<VarDefStmt>>;
61 
63 using TypeSet = std::set<ShPtr<Type>>;
64 
66 using StructTypeSet = std::set<ShPtr<StructType>>;
67 
69 using StmtSet = std::set<ShPtr<Statement>>;
70 
72 using ExpressionSet = std::set<ShPtr<Expression>>;
73 
75 using CallSet = std::set<ShPtr<CallExpr>>;
76 
78 using FuncSet = std::set<ShPtr<Function>>;
79 
81 using StmtUSet = std::unordered_set<ShPtr<Statement>>;
82 
84 using TypeUSet = std::unordered_set<ShPtr<Type>>;
85 
87 using StringVector = std::vector<std::string>;
88 
90 using ValueVector = std::vector<ShPtr<Value>>;
91 
93 using VarVector = std::vector<ShPtr<Variable>>;
94 
96 using StmtVector = std::vector<ShPtr<Statement>>;
97 
99 using ExprVector = std::vector<ShPtr<Expression>>;
100 
102 using CallVector = std::vector<ShPtr<CallExpr>>;
103 
105 using FuncVector = std::vector<ShPtr<Function>>;
106 
108 using GlobalVarDefVector = std::vector<ShPtr<GlobalVarDef>>;
109 
111 using StructTypeVector = std::vector<ShPtr<StructType>>;
112 
114 using VarInitPair = std::pair<ShPtr<Variable>, ShPtr<Expression>>;
115 
117 using VarInitPairVector = std::vector<VarInitPair>;
118 
120 using StringStringMap = std::map<std::string, std::string>;
121 
123 using StringTypeMap = std::map<std::string, ShPtr<Type>>;
124 
126 using VarStringMap = std::map<ShPtr<Variable>, std::string>;
127 
129 using StringVarMap = std::map<std::string, ShPtr<Variable>>;
130 
132 using FuncStringMap = std::map<ShPtr<Function>, std::string>;
133 
135 using IntStringMap = std::map<std::int64_t, std::string>;
136 
138 using VarVarSetMap = std::map<ShPtr<Variable>, VarSet>;
139 
141 using StringStringUMap = std::unordered_map<std::string, std::string>;
142 
143 } // namespace llvmir2hll
144 } // namespace retdec
145 
146 #endif
Definition: address.h:21
Definition: range.h:45
Address, address pair and other derived class representation.
A library providing API for working with back-end IR.
Range< Address > AddressRange
Definition: address.h:53
std::vector< ShPtr< GlobalVarDef > > GlobalVarDefVector
Vector of global variable definitions.
Definition: types.h:108
std::set< ShPtr< CallExpr > > CallSet
Set of function calls.
Definition: types.h:75
std::vector< std::string > StringVector
Vector of strings.
Definition: types.h:87
retdec::common::Address Address
Address.
Definition: types.h:36
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
std::set< ShPtr< Type > > TypeSet
Set of types.
Definition: types.h:63
std::vector< ShPtr< Expression > > ExprVector
Vector of expressions.
Definition: types.h:99
std::vector< ShPtr< StructType > > StructTypeVector
Vector of structured types.
Definition: types.h:111
std::vector< ShPtr< Statement > > StmtVector
Vector of statements.
Definition: types.h:96
std::unordered_set< ShPtr< Statement > > StmtUSet
Unordered set of statements.
Definition: types.h:81
std::set< ShPtr< StructType > > StructTypeSet
Set of structured types.
Definition: types.h:66
std::map< std::int64_t, std::string > IntStringMap
Mapping of a 64b int into a string.
Definition: types.h:135
std::vector< ShPtr< Function > > FuncVector
Vector of functions.
Definition: types.h:105
const AddressRange NO_ADDRESS_RANGE
No address range.
Definition: types.cpp:13
std::set< ShPtr< VarDefStmt > > VarDefStmtSet
Set of VarDefStmt.
Definition: types.h:60
std::set< ShPtr< Variable > > VarSet
Set of variables.
Definition: types.h:57
std::pair< ShPtr< Variable >, ShPtr< Expression > > VarInitPair
Variable with its initializer.
Definition: types.h:114
std::set< ShPtr< Statement > > StmtSet
Set of statements.
Definition: types.h:69
std::set< std::string > StringSet
Set of strings.
Definition: types.h:51
std::set< ShPtr< Function > > FuncSet
Set of functions.
Definition: types.h:78
std::map< std::string, ShPtr< Variable > > StringVarMap
Mapping of a string into a variable.
Definition: types.h:129
std::map< std::string, ShPtr< Type > > StringTypeMap
Mapping of a string into a type.
Definition: types.h:123
std::vector< VarInitPair > VarInitPairVector
List of variables with their initializers.
Definition: types.h:117
std::unordered_map< std::string, std::string > StringStringUMap
Unordered mapping of a string into a string.
Definition: types.h:141
std::vector< ShPtr< CallExpr > > CallVector
Vector of function calls.
Definition: types.h:102
std::unordered_set< ShPtr< Type > > TypeUSet
Unordered set of types.
Definition: types.h:84
std::vector< ShPtr< Value > > ValueVector
Vector of values.
Definition: types.h:90
std::set< ShPtr< Expression > > ExpressionSet
Set of expressions.
Definition: types.h:72
std::map< ShPtr< Variable >, std::string > VarStringMap
Mapping of a variable into a string.
Definition: types.h:126
std::set< ShPtr< Value > > ValueSet
Set of values.
Definition: types.h:54
std::map< ShPtr< Function >, std::string > FuncStringMap
Mapping of a function into a string.
Definition: types.h:132
std::pair< std::uint64_t, std::uint64_t > LineRange
Line range.
Definition: types.h:45
std::map< ShPtr< Variable >, VarSet > VarVarSetMap
Mapping of a variable into a set of variables.
Definition: types.h:138
const LineRange NO_LINE_RANGE
No line range.
Definition: types.cpp:14
std::vector< ShPtr< Variable > > VarVector
Vector of variables.
Definition: types.h:93
std::map< std::string, std::string > StringStringMap
Mapping of a string into a string.
Definition: types.h:120
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.