svf-lib 1.0.2214 → 1.0.2216
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.
- package/SVF-linux/Release-build/bin/ae +0 -0
- package/SVF-linux/Release-build/bin/cfl +0 -0
- package/SVF-linux/Release-build/bin/dvf +0 -0
- package/SVF-linux/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux/Release-build/bin/mta +0 -0
- package/SVF-linux/Release-build/bin/saber +0 -0
- package/SVF-linux/Release-build/bin/svf-ex +0 -0
- package/SVF-linux/Release-build/bin/wpa +0 -0
- package/SVF-linux/Release-build/include/Graphs/BasicBlockG.h +2 -2
- package/SVF-linux/Release-build/include/Graphs/CDG.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/CFLGraph.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/CHG.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/CallGraph.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/ConsGNode.h +1 -1
- package/SVF-linux/Release-build/include/Graphs/GenericGraph.h +3 -3
- package/SVF-linux/Release-build/include/Graphs/ICFGNode.h +6 -6
- package/SVF-linux/Release-build/include/Graphs/VFGNode.h +20 -20
- package/SVF-linux/Release-build/include/MTA/TCT.h +1 -1
- package/SVF-linux/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
- package/SVF-linux/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
- package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +12 -12
- package/SVF-linux/Release-build/include/SVF-LLVM/LLVMUtil.h +2 -2
- package/SVF-linux/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFIRBuilder.h +6 -6
- package/SVF-linux/Release-build/include/SVF-LLVM/{SVFValue.h → SVFLLVMValue.h} +43 -43
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFModule.h +1 -1
- package/SVF-linux/Release-build/include/SVFIR/SVFValue.h +2 -2
- package/SVF-linux/Release-build/include/SVFIR/SVFVariables.h +28 -28
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/Graphs/BasicBlockG.h +2 -2
- package/SVF-osx/Release-build/include/Graphs/CDG.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/CFLGraph.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/CHG.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/CallGraph.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/ConsGNode.h +1 -1
- package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +3 -3
- package/SVF-osx/Release-build/include/Graphs/ICFGNode.h +6 -6
- package/SVF-osx/Release-build/include/Graphs/VFGNode.h +20 -20
- package/SVF-osx/Release-build/include/MTA/TCT.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +12 -12
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +2 -2
- package/SVF-osx/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/SVFIRBuilder.h +6 -6
- package/SVF-osx/Release-build/include/SVF-LLVM/{SVFValue.h → SVFLLVMValue.h} +43 -43
- package/SVF-osx/Release-build/include/SVF-LLVM/SVFModule.h +1 -1
- package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +2 -2
- package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +28 -28
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -115,9 +115,9 @@ public:
|
|
|
115
115
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
static inline bool classof(const
|
|
118
|
+
static inline bool classof(const SVFValue* node)
|
|
119
119
|
{
|
|
120
|
-
return node->getNodeKind() ==
|
|
120
|
+
return node->getNodeKind() == SVFValue::BasicBlockKd;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
static inline bool classof(const SVFBasicBlock* node)
|
|
@@ -140,7 +140,7 @@ protected:
|
|
|
140
140
|
* Generic node on the graph as base class
|
|
141
141
|
*/
|
|
142
142
|
template<class NodeTy,class EdgeTy>
|
|
143
|
-
class GenericNode: public
|
|
143
|
+
class GenericNode: public SVFValue
|
|
144
144
|
{
|
|
145
145
|
friend class SVFIRWriter;
|
|
146
146
|
friend class SVFIRReader;
|
|
@@ -163,7 +163,7 @@ private:
|
|
|
163
163
|
|
|
164
164
|
public:
|
|
165
165
|
/// Constructor
|
|
166
|
-
GenericNode(NodeID i, GNodeK k, const SVFType* svfType = nullptr):
|
|
166
|
+
GenericNode(NodeID i, GNodeK k, const SVFType* svfType = nullptr): SVFValue(i, k, svfType)
|
|
167
167
|
{
|
|
168
168
|
|
|
169
169
|
}
|
|
@@ -327,7 +327,7 @@ public:
|
|
|
327
327
|
return true;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
static inline bool classof(const
|
|
330
|
+
static inline bool classof(const SVFValue*)
|
|
331
331
|
{
|
|
332
332
|
return true;
|
|
333
333
|
}
|
|
@@ -137,7 +137,7 @@ public:
|
|
|
137
137
|
return isICFGNodeKinds(node->getNodeKind());
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
static inline bool classof(const
|
|
140
|
+
static inline bool classof(const SVFValue* node)
|
|
141
141
|
{
|
|
142
142
|
return isICFGNodeKinds(node->getNodeKind());
|
|
143
143
|
}
|
|
@@ -261,7 +261,7 @@ public:
|
|
|
261
261
|
return isInterICFGNodeKind(node->getNodeKind());
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
static inline bool classof(const
|
|
264
|
+
static inline bool classof(const SVFValue* node)
|
|
265
265
|
{
|
|
266
266
|
return isInterICFGNodeKind(node->getNodeKind());
|
|
267
267
|
}
|
|
@@ -331,7 +331,7 @@ public:
|
|
|
331
331
|
return node->getNodeKind() == FunEntryBlock;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
static inline bool classof(const
|
|
334
|
+
static inline bool classof(const SVFValue*node)
|
|
335
335
|
{
|
|
336
336
|
return node->getNodeKind() == FunEntryBlock;
|
|
337
337
|
}
|
|
@@ -399,7 +399,7 @@ public:
|
|
|
399
399
|
return node->getNodeKind() == FunExitBlock;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
static inline bool classof(const
|
|
402
|
+
static inline bool classof(const SVFValue*node)
|
|
403
403
|
{
|
|
404
404
|
return node->getNodeKind() == FunExitBlock;
|
|
405
405
|
}
|
|
@@ -571,7 +571,7 @@ public:
|
|
|
571
571
|
return node->getNodeKind() == FunCallBlock;
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
static inline bool classof(const
|
|
574
|
+
static inline bool classof(const SVFValue*node)
|
|
575
575
|
{
|
|
576
576
|
return node->getNodeKind() == FunCallBlock;
|
|
577
577
|
}
|
|
@@ -650,7 +650,7 @@ public:
|
|
|
650
650
|
{
|
|
651
651
|
return node->getNodeKind() == FunRetBlock;
|
|
652
652
|
}
|
|
653
|
-
static inline bool classof(const
|
|
653
|
+
static inline bool classof(const SVFValue*node)
|
|
654
654
|
{
|
|
655
655
|
return node->getNodeKind() == FunRetBlock;
|
|
656
656
|
}
|
|
@@ -112,7 +112,7 @@ public:
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
static inline bool classof(const
|
|
115
|
+
static inline bool classof(const SVFValue* node)
|
|
116
116
|
{
|
|
117
117
|
return isVFGNodeKinds(node->getNodeKind());
|
|
118
118
|
}
|
|
@@ -184,7 +184,7 @@ public:
|
|
|
184
184
|
{
|
|
185
185
|
return isStmtVFGNodeKinds(node->getNodeKind());
|
|
186
186
|
}
|
|
187
|
-
static inline bool classof(const
|
|
187
|
+
static inline bool classof(const SVFValue*node)
|
|
188
188
|
{
|
|
189
189
|
return isStmtVFGNodeKinds(node->getNodeKind());
|
|
190
190
|
}
|
|
@@ -228,7 +228,7 @@ public:
|
|
|
228
228
|
{
|
|
229
229
|
return node->getNodeKind() == Load;
|
|
230
230
|
}
|
|
231
|
-
static inline bool classof(const
|
|
231
|
+
static inline bool classof(const SVFValue*node)
|
|
232
232
|
{
|
|
233
233
|
return node->getNodeKind() == Load;
|
|
234
234
|
}
|
|
@@ -273,7 +273,7 @@ public:
|
|
|
273
273
|
{
|
|
274
274
|
return node->getNodeKind() == Store;
|
|
275
275
|
}
|
|
276
|
-
static inline bool classof(const
|
|
276
|
+
static inline bool classof(const SVFValue*node)
|
|
277
277
|
{
|
|
278
278
|
return node->getNodeKind() == Store;
|
|
279
279
|
}
|
|
@@ -318,7 +318,7 @@ public:
|
|
|
318
318
|
{
|
|
319
319
|
return node->getNodeKind() == Copy;
|
|
320
320
|
}
|
|
321
|
-
static inline bool classof(const
|
|
321
|
+
static inline bool classof(const SVFValue*node)
|
|
322
322
|
{
|
|
323
323
|
return node->getNodeKind() == Copy;
|
|
324
324
|
}
|
|
@@ -364,7 +364,7 @@ public:
|
|
|
364
364
|
{
|
|
365
365
|
return node->getNodeKind() == Cmp;
|
|
366
366
|
}
|
|
367
|
-
static inline bool classof(const
|
|
367
|
+
static inline bool classof(const SVFValue*node)
|
|
368
368
|
{
|
|
369
369
|
return node->getNodeKind() == Cmp;
|
|
370
370
|
}
|
|
@@ -441,7 +441,7 @@ public:
|
|
|
441
441
|
{
|
|
442
442
|
return node->getNodeKind() == BinaryOp;
|
|
443
443
|
}
|
|
444
|
-
static inline bool classof(const
|
|
444
|
+
static inline bool classof(const SVFValue*node)
|
|
445
445
|
{
|
|
446
446
|
return node->getNodeKind() == BinaryOp;
|
|
447
447
|
}
|
|
@@ -515,7 +515,7 @@ public:
|
|
|
515
515
|
{
|
|
516
516
|
return node->getNodeKind() == UnaryOp;
|
|
517
517
|
}
|
|
518
|
-
static inline bool classof(const
|
|
518
|
+
static inline bool classof(const SVFValue*node)
|
|
519
519
|
{
|
|
520
520
|
return node->getNodeKind() == UnaryOp;
|
|
521
521
|
}
|
|
@@ -587,7 +587,7 @@ public:
|
|
|
587
587
|
{
|
|
588
588
|
return node->getNodeKind() == Branch;
|
|
589
589
|
}
|
|
590
|
-
static inline bool classof(const
|
|
590
|
+
static inline bool classof(const SVFValue*node)
|
|
591
591
|
{
|
|
592
592
|
return node->getNodeKind() == Branch;
|
|
593
593
|
}
|
|
@@ -653,7 +653,7 @@ public:
|
|
|
653
653
|
{
|
|
654
654
|
return node->getNodeKind() == Gep;
|
|
655
655
|
}
|
|
656
|
-
static inline bool classof(const
|
|
656
|
+
static inline bool classof(const SVFValue*node)
|
|
657
657
|
{
|
|
658
658
|
return node->getNodeKind() == Gep;
|
|
659
659
|
}
|
|
@@ -730,7 +730,7 @@ public:
|
|
|
730
730
|
{
|
|
731
731
|
return isPHIVFGNodeKinds(node->getNodeKind());
|
|
732
732
|
}
|
|
733
|
-
static inline bool classof(const
|
|
733
|
+
static inline bool classof(const SVFValue*node)
|
|
734
734
|
{
|
|
735
735
|
return isPHIVFGNodeKinds(node->getNodeKind());
|
|
736
736
|
}
|
|
@@ -790,7 +790,7 @@ public:
|
|
|
790
790
|
{
|
|
791
791
|
return node->getNodeKind() == TIntraPhi;
|
|
792
792
|
}
|
|
793
|
-
static inline bool classof(const
|
|
793
|
+
static inline bool classof(const SVFValue*node)
|
|
794
794
|
{
|
|
795
795
|
return node->getNodeKind() == TIntraPhi;
|
|
796
796
|
}
|
|
@@ -831,7 +831,7 @@ public:
|
|
|
831
831
|
{
|
|
832
832
|
return node->getNodeKind() == Addr;
|
|
833
833
|
}
|
|
834
|
-
static inline bool classof(const
|
|
834
|
+
static inline bool classof(const SVFValue*node)
|
|
835
835
|
{
|
|
836
836
|
return node->getNodeKind() == Addr;
|
|
837
837
|
}
|
|
@@ -875,7 +875,7 @@ public:
|
|
|
875
875
|
{
|
|
876
876
|
return isArgumentVFGNodeKinds(node->getNodeKind());
|
|
877
877
|
}
|
|
878
|
-
static inline bool classof(const
|
|
878
|
+
static inline bool classof(const SVFValue*node)
|
|
879
879
|
{
|
|
880
880
|
return isArgumentVFGNodeKinds(node->getNodeKind());
|
|
881
881
|
}
|
|
@@ -929,7 +929,7 @@ public:
|
|
|
929
929
|
{
|
|
930
930
|
return node->getNodeKind() == AParm;
|
|
931
931
|
}
|
|
932
|
-
static inline bool classof(const
|
|
932
|
+
static inline bool classof(const SVFValue*node)
|
|
933
933
|
{
|
|
934
934
|
return node->getNodeKind() == AParm;
|
|
935
935
|
}
|
|
@@ -1003,7 +1003,7 @@ public:
|
|
|
1003
1003
|
{
|
|
1004
1004
|
return node->getNodeKind() == FParm;
|
|
1005
1005
|
}
|
|
1006
|
-
static inline bool classof(const
|
|
1006
|
+
static inline bool classof(const SVFValue*node)
|
|
1007
1007
|
{
|
|
1008
1008
|
return node->getNodeKind() == FParm;
|
|
1009
1009
|
}
|
|
@@ -1065,7 +1065,7 @@ public:
|
|
|
1065
1065
|
{
|
|
1066
1066
|
return node->getNodeKind() == ARet;
|
|
1067
1067
|
}
|
|
1068
|
-
static inline bool classof(const
|
|
1068
|
+
static inline bool classof(const SVFValue*node)
|
|
1069
1069
|
{
|
|
1070
1070
|
return node->getNodeKind() == ARet;
|
|
1071
1071
|
}
|
|
@@ -1135,7 +1135,7 @@ public:
|
|
|
1135
1135
|
{
|
|
1136
1136
|
return node->getNodeKind() == FRet;
|
|
1137
1137
|
}
|
|
1138
|
-
static inline bool classof(const
|
|
1138
|
+
static inline bool classof(const SVFValue*node)
|
|
1139
1139
|
{
|
|
1140
1140
|
return node->getNodeKind() == FRet;
|
|
1141
1141
|
}
|
|
@@ -1198,7 +1198,7 @@ public:
|
|
|
1198
1198
|
{
|
|
1199
1199
|
return node->getNodeKind() == TInterPhi;
|
|
1200
1200
|
}
|
|
1201
|
-
static inline bool classof(const
|
|
1201
|
+
static inline bool classof(const SVFValue*node)
|
|
1202
1202
|
{
|
|
1203
1203
|
return node->getNodeKind() == TInterPhi;
|
|
1204
1204
|
}
|
|
@@ -1250,7 +1250,7 @@ public:
|
|
|
1250
1250
|
{
|
|
1251
1251
|
return node->getNodeKind() == NPtr;
|
|
1252
1252
|
}
|
|
1253
|
-
static inline bool classof(const
|
|
1253
|
+
static inline bool classof(const SVFValue*node)
|
|
1254
1254
|
{
|
|
1255
1255
|
return node->getNodeKind() == NPtr;
|
|
1256
1256
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
#define INCLUDE_SVF_FE_LLVMMODULE_H_
|
|
32
32
|
|
|
33
33
|
#include "SVF-LLVM/BasicTypes.h"
|
|
34
|
-
#include "SVF-LLVM/
|
|
34
|
+
#include "SVF-LLVM/SVFLLVMValue.h"
|
|
35
35
|
#include "SVF-LLVM/SVFModule.h"
|
|
36
36
|
#include "Util/Options.h"
|
|
37
37
|
#include "Graphs/BasicBlockG.h"
|
|
@@ -61,8 +61,8 @@ public:
|
|
|
61
61
|
typedef Map<const Argument*, SVFArgument*> LLVMArgument2SVFArgumentMap;
|
|
62
62
|
typedef Map<const Constant*, SVFConstant*> LLVMConst2SVFConstMap;
|
|
63
63
|
typedef Map<const Value*, SVFOtherValue*> LLVMValue2SVFOtherValueMap;
|
|
64
|
-
typedef Map<const
|
|
65
|
-
typedef Map<const
|
|
64
|
+
typedef Map<const SVFLLVMValue*, const Value*> SVFValue2LLVMValueMap;
|
|
65
|
+
typedef Map<const SVFValue*, const Value*> SVFBaseNode2LLVMValueMap;
|
|
66
66
|
typedef Map<const Type*, SVFType*> LLVMType2SVFTypeMap;
|
|
67
67
|
typedef Map<const Type*, StInfo*> Type2TypeInfoMap;
|
|
68
68
|
typedef Map<std::string, std::vector<std::string>> Fun2AnnoMap;
|
|
@@ -75,7 +75,7 @@ public:
|
|
|
75
75
|
|
|
76
76
|
/// llvm value to sym id map
|
|
77
77
|
/// local (%) and global (@) identifiers are pointer types which have a value node id.
|
|
78
|
-
typedef OrderedMap<const
|
|
78
|
+
typedef OrderedMap<const SVFLLVMValue*, NodeID> ValueToIDMapTy;
|
|
79
79
|
|
|
80
80
|
typedef OrderedMap<const SVFFunction*, NodeID> FunToIDMapTy;
|
|
81
81
|
|
|
@@ -208,13 +208,13 @@ public:
|
|
|
208
208
|
|
|
209
209
|
/// Get SVFIR Node according to LLVM value
|
|
210
210
|
///getNode - Return the node corresponding to the specified pointer.
|
|
211
|
-
NodeID getValueNode(const
|
|
211
|
+
NodeID getValueNode(const SVFLLVMValue* V);
|
|
212
212
|
|
|
213
|
-
bool hasValueNode(const
|
|
213
|
+
bool hasValueNode(const SVFLLVMValue* V);
|
|
214
214
|
|
|
215
215
|
/// getObject - Return the obj node id refer to the memory object for the
|
|
216
216
|
/// specified global, heap or alloca instruction according to llvm value.
|
|
217
|
-
NodeID getObjectNode(const
|
|
217
|
+
NodeID getObjectNode(const SVFLLVMValue* V);
|
|
218
218
|
|
|
219
219
|
void dumpSymTable();
|
|
220
220
|
|
|
@@ -285,16 +285,16 @@ public:
|
|
|
285
285
|
setValueAttr(ov,svfov);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
|
|
288
|
+
SVFLLVMValue* getSVFValue(const Value* value);
|
|
289
289
|
|
|
290
|
-
const Value* getLLVMValue(const
|
|
290
|
+
const Value* getLLVMValue(const SVFLLVMValue* value) const
|
|
291
291
|
{
|
|
292
292
|
SVFValue2LLVMValueMap::const_iterator it = SVFValue2LLVMValue.find(value);
|
|
293
293
|
assert(it!=SVFValue2LLVMValue.end() && "can't find corresponding llvm value!");
|
|
294
294
|
return it->second;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
const Value* getLLVMValue(const
|
|
297
|
+
const Value* getLLVMValue(const SVFValue* value) const
|
|
298
298
|
{
|
|
299
299
|
SVFBaseNode2LLVMValueMap ::const_iterator it = SVFBaseNode2LLVMValue.find(value);
|
|
300
300
|
assert(it != SVFBaseNode2LLVMValue.end() && "can't find corresponding llvm value!");
|
|
@@ -536,8 +536,8 @@ private:
|
|
|
536
536
|
void initSVFFunction();
|
|
537
537
|
void initSVFBasicBlock(const Function* func);
|
|
538
538
|
void initDomTree(SVFFunction* func, const Function* f);
|
|
539
|
-
void setValueAttr(const Value* val,
|
|
540
|
-
void addToSVFVar2LLVMValueMap(const Value* val,
|
|
539
|
+
void setValueAttr(const Value* val, SVFLLVMValue* value);
|
|
540
|
+
void addToSVFVar2LLVMValueMap(const Value* val, SVFValue* svfBaseNode);
|
|
541
541
|
void buildFunToFunMap();
|
|
542
542
|
void buildGlobalDefToRepMap();
|
|
543
543
|
/// Invoke llvm passes to modify module
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
#include "Util/SVFUtil.h"
|
|
34
34
|
#include "SVF-LLVM/BasicTypes.h"
|
|
35
|
-
#include "SVF-LLVM/
|
|
35
|
+
#include "SVF-LLVM/SVFLLVMValue.h"
|
|
36
36
|
#include "Util/ThreadAPI.h"
|
|
37
37
|
|
|
38
38
|
namespace SVF
|
|
@@ -377,7 +377,7 @@ inline bool isConstDataOrAggData(const Value* val)
|
|
|
377
377
|
const Value* getGlobalRep(const Value* val);
|
|
378
378
|
|
|
379
379
|
/// Check whether this value points-to a constant object
|
|
380
|
-
bool isConstantObjSym(const
|
|
380
|
+
bool isConstantObjSym(const SVFLLVMValue* val);
|
|
381
381
|
|
|
382
382
|
/// Check whether this value points-to a constant object
|
|
383
383
|
bool isConstantObjSym(const Value* val);
|
|
@@ -50,7 +50,7 @@ private:
|
|
|
50
50
|
SVFIR* pag;
|
|
51
51
|
SVFModule* svfModule;
|
|
52
52
|
const SVFBasicBlock* curBB; ///< Current basic block during SVFIR construction when visiting the module
|
|
53
|
-
const
|
|
53
|
+
const SVFLLVMValue* curVal; ///< Current Value during SVFIR construction when visiting the module
|
|
54
54
|
|
|
55
55
|
public:
|
|
56
56
|
/// Constructor
|
|
@@ -93,14 +93,14 @@ public:
|
|
|
93
93
|
processCE(V);
|
|
94
94
|
|
|
95
95
|
// strip off the constant cast and return the value node
|
|
96
|
-
|
|
96
|
+
SVFLLVMValue* svfVal = llvmModuleSet()->getSVFValue(V);
|
|
97
97
|
return llvmModuleSet()->getValueNode(svfVal);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/// GetObject - Return the object node (stack/global/heap/function) according to a LLVM Value
|
|
101
101
|
inline NodeID getObjectNode(const Value* V)
|
|
102
102
|
{
|
|
103
|
-
|
|
103
|
+
SVFLLVMValue* svfVal = llvmModuleSet()->getSVFValue(V);
|
|
104
104
|
return llvmModuleSet()->getObjectNode(svfVal);
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -246,12 +246,12 @@ protected:
|
|
|
246
246
|
curBB = (bb == nullptr? nullptr : llvmModuleSet()->getSVFBasicBlock(bb));
|
|
247
247
|
curVal = (val == nullptr ? nullptr: llvmModuleSet()->getSVFValue(val));
|
|
248
248
|
}
|
|
249
|
-
inline void setCurrentLocation(const
|
|
249
|
+
inline void setCurrentLocation(const SVFLLVMValue* val, const SVFBasicBlock* bb)
|
|
250
250
|
{
|
|
251
251
|
curBB = bb;
|
|
252
252
|
curVal = val;
|
|
253
253
|
}
|
|
254
|
-
inline const
|
|
254
|
+
inline const SVFLLVMValue* getCurrentValue() const
|
|
255
255
|
{
|
|
256
256
|
return curVal;
|
|
257
257
|
}
|
|
@@ -263,7 +263,7 @@ protected:
|
|
|
263
263
|
/// Add global black hole Address edge
|
|
264
264
|
void addGlobalBlackHoleAddrEdge(NodeID node, const ConstantExpr *int2Ptrce)
|
|
265
265
|
{
|
|
266
|
-
const
|
|
266
|
+
const SVFLLVMValue* cval = getCurrentValue();
|
|
267
267
|
const SVFBasicBlock* cbb = getCurrentBB();
|
|
268
268
|
setCurrentLocation(int2Ptrce,nullptr);
|
|
269
269
|
addBlackHoleAddrEdge(node);
|