svf-lib 1.0.1000 → 1.0.1001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@
11
11
  #include <set>
12
12
  #include <vector>
13
13
  #include "Util/BasicTypes.h"
14
+ #include "SVF-FE/BasicTypes.h"
14
15
 
15
16
  namespace SVF
16
17
  {
@@ -1,24 +1,48 @@
1
1
  #ifndef SVF_FE_BASIC_TYPES_H
2
2
  #define SVF_FE_BASIC_TYPES_H
3
3
 
4
+ #include "SVF-FE/GEPTypeBridgeIterator.h"
5
+
6
+ #include <llvm/Pass.h>
7
+
4
8
  #include <llvm/IR/Instructions.h>
5
9
  #include <llvm/IR/IntrinsicInst.h>
6
10
  #include <llvm/IR/LLVMContext.h>
7
11
  #include <llvm/IR/Metadata.h>
8
12
  #include <llvm/IR/DataLayout.h>
13
+ #include <llvm/IR/IRBuilder.h>
14
+ #include <llvm/IR/DebugInfo.h>
15
+ #include <llvm/IR/InstIterator.h>
16
+ #include <llvm/IR/GetElementPtrTypeIterator.h>
17
+ #include <llvm/IR/DerivedTypes.h>
9
18
 
10
19
  #include <llvm/Analysis/MemoryLocation.h>
20
+ #include <llvm/Analysis/ScalarEvolution.h>
21
+ #include <llvm/Analysis/ScalarEvolutionExpressions.h>
22
+
23
+ #include <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>
11
24
 
12
25
  #include <llvm/Support/SourceMgr.h>
13
26
 
14
27
  typedef llvm::LLVMContext LLVMContext;
15
28
  typedef llvm::Use Use;
29
+ typedef llvm::ModulePass ModulePass;
30
+ typedef llvm::IRBuilder<> IRBuilder;
31
+ #if LLVM_VERSION_MAJOR >= 12
32
+ typedef llvm::UnifyFunctionExitNodesLegacyPass UnifyFunctionExitNodes;
33
+ #else
34
+ typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
35
+ #endif
36
+
16
37
 
17
38
  typedef llvm::SMDiagnostic SMDiagnostic;
18
39
 
19
- typedef llvm::MetadataAsValue MetadataAsValue;
20
40
  typedef llvm::BlockAddress BlockAddress;
21
41
 
42
+ // LLVM Metadata
43
+ typedef llvm::MDString MDString;
44
+ typedef llvm::MetadataAsValue MetadataAsValue;
45
+
22
46
  // LLVM data layout
23
47
  typedef llvm::StructLayout StructLayout;
24
48
  typedef llvm::ConstantStruct ConstantStruct;
@@ -29,6 +53,7 @@ typedef llvm::ConstantAggregate ConstantAggregate;
29
53
  typedef llvm::ConstantAggregateZero ConstantAggregateZero;
30
54
  typedef llvm::ConstantDataSequential ConstantDataSequential;
31
55
  typedef llvm::ConstantExpr ConstantExpr;
56
+ typedef llvm::ConstantDataArray ConstantDataArray;
32
57
 
33
58
  // LLVM Instructions
34
59
  typedef llvm::AllocaInst AllocaInst;
@@ -64,4 +89,34 @@ typedef llvm::BinaryOperator BinaryOperator;
64
89
  typedef llvm::UnaryOperator UnaryOperator;
65
90
  typedef llvm::UndefValue UndefValue;
66
91
 
92
+ // LLVM Debug Information
93
+ typedef llvm::DebugInfoFinder DebugInfoFinder;
94
+ typedef llvm::DISubroutineType DISubroutineType;
95
+ typedef llvm::DIBasicType DIBasicType;
96
+ typedef llvm::DISubrange DISubrange;
97
+ typedef llvm::DINode DINode;
98
+ typedef llvm::DINodeArray DINodeArray;
99
+ typedef llvm::DITypeRefArray DITypeRefArray;
100
+
101
+ // Iterators.
102
+ typedef llvm::inst_iterator inst_iterator;
103
+ typedef llvm::gep_type_iterator gep_type_iterator;
104
+ typedef llvm::bridge_gep_iterator bridge_gep_iterator;
105
+ typedef llvm::const_inst_iterator const_inst_iterator;
106
+ typedef llvm::const_pred_iterator const_pred_iterator;
107
+
108
+ // LLVM Scalar Evolution.
109
+ typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass;
110
+ typedef llvm::SCEVAddRecExpr SCEVAddRecExpr;
111
+ typedef llvm::SCEVConstant SCEVConstant;
112
+ typedef llvm::ScalarEvolution ScalarEvolution;
113
+ typedef llvm::SCEV SCEV;
114
+
115
+ // LLVM Types.
116
+ typedef llvm::VectorType VectorType;
117
+ #if (LLVM_VERSION_MAJOR >= 9)
118
+ typedef llvm::FunctionCallee FunctionCallee;
119
+ #endif
120
+
121
+
67
122
  #endif // SVF_FE_BASIC_TYPES_H
@@ -33,6 +33,7 @@
33
33
  #include "Util/BasicTypes.h"
34
34
  #include "llvm/IR/LegacyPassManager.h"
35
35
  #include "llvm/Transforms/IPO/PassManagerBuilder.h"
36
+ #include "SVF-FE/BasicTypes.h"
36
37
 
37
38
  namespace SVF
38
39
  {
@@ -31,7 +31,6 @@
31
31
  #define BASICTYPES_H_
32
32
 
33
33
  #include "Util/SVFBasicTypes.h"
34
- #include "SVF-FE/GEPTypeBridgeIterator.h"
35
34
  #include "Graphs/GraphPrinter.h"
36
35
  #include "Util/Casting.h"
37
36
  #include <llvm/ADT/SparseBitVector.h>
@@ -39,7 +38,6 @@
39
38
  #include <llvm/IR/InstVisitor.h> // for instruction visitor
40
39
  #include <llvm/IR/InstIterator.h> // for inst iteration
41
40
  #include <llvm/IR/GetElementPtrTypeIterator.h> //for gep iterator
42
- #include <llvm/Analysis/ScalarEvolution.h>
43
41
  #include <llvm/ADT/StringExtras.h> // for utostr_32
44
42
  #include <llvm/Analysis/AliasAnalysis.h>
45
43
  #include <llvm/Analysis/CallGraph.h> // call graph
@@ -48,14 +46,10 @@
48
46
  #include <llvm/Bitcode/BitcodeWriter.h> // for WriteBitcodeToFile
49
47
  #include <llvm/Bitcode/BitcodeReader.h> /// for isBitcode
50
48
  #include <llvm/IRReader/IRReader.h> // IR reader for bit file
51
- #include <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>
52
49
  #include <llvm/Analysis/DominanceFrontier.h>
53
50
  #include <llvm/Analysis/PostDominators.h>
54
- #include <llvm/Analysis/ScalarEvolutionExpressions.h>
55
51
  #include <llvm/ADT/GraphTraits.h> // for Graphtraits
56
- #include <llvm/IR/IRBuilder.h> // for instrument svf.main
57
52
  #include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
58
- #include <llvm/IR/DebugInfo.h>
59
53
 
60
54
  #include "llvm/Analysis/LoopInfo.h"
61
55
  #include "llvm/IR/CFG.h"
@@ -80,12 +74,6 @@ typedef llvm::Module Module;
80
74
  typedef llvm::User User;
81
75
  typedef llvm::Loop Loop;
82
76
  typedef llvm::LoopInfo LoopInfo;
83
- #if LLVM_VERSION_MAJOR >= 12
84
- typedef llvm::UnifyFunctionExitNodesLegacyPass UnifyFunctionExitNodes;
85
- #else
86
- typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
87
- #endif
88
- typedef llvm::ModulePass ModulePass;
89
77
 
90
78
  /// LLVM outputs
91
79
  typedef llvm::raw_string_ostream raw_string_ostream;
@@ -97,7 +85,6 @@ typedef llvm::StructType StructType;
97
85
  typedef llvm::ArrayType ArrayType;
98
86
  typedef llvm::PointerType PointerType;
99
87
  typedef llvm::FunctionType FunctionType;
100
- typedef llvm::VectorType VectorType;
101
88
 
102
89
  /// LLVM data layout
103
90
  typedef llvm::DataLayout DataLayout;
@@ -110,66 +97,37 @@ typedef llvm::ConstantInt ConstantInt;
110
97
  typedef llvm::ConstantPointerNull ConstantPointerNull;
111
98
  typedef llvm::ConstantArray ConstantArray;
112
99
  typedef llvm::GlobalAlias GlobalAlias;
113
- typedef llvm::ConstantDataArray ConstantDataArray;
114
100
 
115
101
  /// LLVM metadata
116
102
  typedef llvm::NamedMDNode NamedMDNode;
117
- typedef llvm::MDString MDString;
118
103
  typedef llvm::MDNode MDNode;
119
104
 
120
-
121
105
  /// LLVM Instructions
122
106
  typedef llvm::CallInst CallInst;
123
107
  typedef llvm::StoreInst StoreInst;
124
108
  typedef llvm::LoadInst LoadInst;
125
109
 
126
- #if (LLVM_VERSION_MAJOR >= 9)
127
- typedef llvm::FunctionCallee FunctionCallee;
128
- #endif
129
-
130
- /// LLVM scalar evolution
131
- typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass;
132
- typedef llvm::ScalarEvolution ScalarEvolution;
133
- typedef llvm::SCEVAddRecExpr SCEVAddRecExpr;
134
- typedef llvm::SCEVConstant SCEVConstant;
135
- typedef llvm::SCEV SCEV;
136
-
137
110
  /// LLVM Dominators
138
111
  typedef llvm::DominanceFrontier DominanceFrontier;
139
112
  typedef llvm::DominatorTree DominatorTree;
140
113
  typedef llvm::PostDominatorTree PostDominatorTree;
141
114
  typedef llvm::DomTreeNode DomTreeNode;
142
115
  typedef llvm::DominanceFrontierBase<BasicBlock, false> DominanceFrontierBase;
143
- typedef llvm::PostDominatorTreeWrapperPass PostDominatorTreeWrapperPass;
144
- typedef llvm::LoopInfoWrapperPass LoopInfoWrapperPass;
145
116
 
146
117
  /// LLVM Iterators
147
- typedef llvm::inst_iterator inst_iterator;
148
118
  #if LLVM_VERSION_MAJOR >= 11
149
119
  typedef llvm::const_succ_iterator succ_const_iterator;
150
120
  #else
151
121
  typedef llvm::succ_const_iterator succ_const_iterator;
152
122
  #endif
153
- typedef llvm::const_inst_iterator const_inst_iterator;
154
- typedef llvm::const_pred_iterator const_pred_iterator;
155
- typedef llvm::gep_type_iterator gep_type_iterator;
156
- typedef llvm::bridge_gep_iterator bridge_gep_iterator;
157
123
  typedef llvm::GraphPrinter GraphPrinter;
158
- typedef llvm::IRBuilder<> IRBuilder;
159
124
  typedef llvm::IntegerType IntegerType;
160
125
 
161
126
  /// LLVM debug information
162
- typedef llvm::DebugInfoFinder DebugInfoFinder;
163
127
  typedef llvm::DIType DIType;
164
- typedef llvm::DIBasicType DIBasicType;
165
128
  typedef llvm::DICompositeType DICompositeType;
166
129
  typedef llvm::DIDerivedType DIDerivedType;
167
- typedef llvm::DISubroutineType DISubroutineType;
168
130
  typedef llvm::DISubprogram DISubprogram;
169
- typedef llvm::DISubrange DISubrange;
170
- typedef llvm::DINode DINode;
171
- typedef llvm::DINodeArray DINodeArray;
172
- typedef llvm::DITypeRefArray DITypeRefArray;
173
131
  namespace dwarf = llvm::dwarf;
174
132
 
175
133
  class SVFFunction : public SVFValue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1000",
3
+ "version": "1.0.1001",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {