svf-lib 1.0.955 → 1.0.958
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/lib/libSvf.a +0 -0
- package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +3 -4
- package/SVF-linux/include/SVF-FE/BasicTypes.h +5 -0
- package/SVF-linux/include/SVF-FE/LLVMUtil.h +13 -0
- package/SVF-linux/include/Util/BasicTypes.h +0 -5
- package/SVF-linux/include/Util/SVFUtil.h +0 -5
- package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +3 -4
- package/SVF-osx/include/SVF-FE/BasicTypes.h +5 -0
- package/SVF-osx/include/SVF-FE/LLVMUtil.h +13 -0
- package/SVF-osx/include/Util/BasicTypes.h +0 -5
- package/SVF-osx/include/Util/SVFUtil.h +0 -5
- package/package.json +1 -1
|
Binary file
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
#include "Util/SVFUtil.h"
|
|
35
|
+
#include "SVF-FE/LLVMUtil.h"
|
|
35
36
|
#include "MemoryModel/LocationSet.h"
|
|
36
37
|
#include "Util/SVFModule.h"
|
|
37
38
|
namespace SVF
|
|
@@ -163,8 +164,6 @@ public:
|
|
|
163
164
|
// @{
|
|
164
165
|
static bool isNullPtrSym(const Value *val);
|
|
165
166
|
|
|
166
|
-
static bool isBlackholeSym(const Value *val);
|
|
167
|
-
|
|
168
167
|
bool isConstantObjSym(const Value *val);
|
|
169
168
|
|
|
170
169
|
static inline bool isBlkPtr(NodeID id)
|
|
@@ -232,7 +231,7 @@ public:
|
|
|
232
231
|
|
|
233
232
|
if(isNullPtrSym(val))
|
|
234
233
|
return nullPtrSymID();
|
|
235
|
-
else if(isBlackholeSym(val))
|
|
234
|
+
else if (SVFUtil::isBlackholeSym(val))
|
|
236
235
|
return blkPtrSymID();
|
|
237
236
|
else
|
|
238
237
|
{
|
|
@@ -244,7 +243,7 @@ public:
|
|
|
244
243
|
|
|
245
244
|
inline bool hasValSym(const Value* val)
|
|
246
245
|
{
|
|
247
|
-
if (isNullPtrSym(val) || isBlackholeSym(val))
|
|
246
|
+
if (isNullPtrSym(val) || SVFUtil::isBlackholeSym(val))
|
|
248
247
|
return true;
|
|
249
248
|
else
|
|
250
249
|
return (valSymMap.find(val) != valSymMap.end());
|
|
@@ -27,10 +27,14 @@ typedef llvm::ConstantDataSequential ConstantDataSequential;
|
|
|
27
27
|
typedef llvm::ConstantExpr ConstantExpr;
|
|
28
28
|
|
|
29
29
|
// LLVM Instructions
|
|
30
|
+
typedef llvm::AllocaInst AllocaInst;
|
|
30
31
|
typedef llvm::AtomicCmpXchgInst AtomicCmpXchgInst;
|
|
31
32
|
typedef llvm::AtomicRMWInst AtomicRMWInst;
|
|
32
33
|
typedef llvm::BitCastInst BitCastInst;
|
|
34
|
+
typedef llvm::BranchInst BranchInst;
|
|
35
|
+
typedef llvm::SwitchInst SwitchInst;
|
|
33
36
|
typedef llvm::CallBrInst CallBrInst;
|
|
37
|
+
typedef llvm::ReturnInst ReturnInst;
|
|
34
38
|
typedef llvm::CastInst CastInst;
|
|
35
39
|
typedef llvm::CmpInst CmpInst;
|
|
36
40
|
typedef llvm::ExtractValueInst ExtractValueInst;
|
|
@@ -54,5 +58,6 @@ typedef llvm::VAEndInst VAEndInst;
|
|
|
54
58
|
typedef llvm::VAStartInst VAStartInst;
|
|
55
59
|
typedef llvm::BinaryOperator BinaryOperator;
|
|
56
60
|
typedef llvm::UnaryOperator UnaryOperator;
|
|
61
|
+
typedef llvm::UndefValue UndefValue;
|
|
57
62
|
|
|
58
63
|
#endif // SVF_FE_BASIC_TYPES_H
|
|
@@ -59,6 +59,13 @@ inline const Function* getLLVMFunction(const Value* val)
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
/// Check whether this value is a black hole
|
|
63
|
+
inline bool isBlackholeSym(const Value *val)
|
|
64
|
+
{
|
|
65
|
+
return (SVFUtil::isa<UndefValue>(val));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
62
69
|
/// Return true if the call is an external call (external library in function summary table)
|
|
63
70
|
/// If the libary function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
|
|
64
71
|
//@{
|
|
@@ -78,6 +85,12 @@ inline bool isExtCall(const Instruction *inst)
|
|
|
78
85
|
}
|
|
79
86
|
//@}
|
|
80
87
|
|
|
88
|
+
/// Whether an instruction is a return instruction
|
|
89
|
+
inline bool isReturn(const Instruction* inst)
|
|
90
|
+
{
|
|
91
|
+
return SVFUtil::isa<ReturnInst>(inst);
|
|
92
|
+
}
|
|
93
|
+
|
|
81
94
|
/// Return true if the call is a heap allocator/reallocator
|
|
82
95
|
//@{
|
|
83
96
|
/// note that these two functions are not suppose to be used externally
|
|
@@ -123,14 +123,9 @@ typedef llvm::MDNode MDNode;
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
/// LLVM Instructions
|
|
126
|
-
typedef llvm::AllocaInst AllocaInst;
|
|
127
126
|
typedef llvm::CallInst CallInst;
|
|
128
127
|
typedef llvm::StoreInst StoreInst;
|
|
129
128
|
typedef llvm::LoadInst LoadInst;
|
|
130
|
-
typedef llvm::ReturnInst ReturnInst;
|
|
131
|
-
typedef llvm::BranchInst BranchInst;
|
|
132
|
-
typedef llvm::SwitchInst SwitchInst;
|
|
133
|
-
typedef llvm::UndefValue UndefValue;
|
|
134
129
|
|
|
135
130
|
#if (LLVM_VERSION_MAJOR >= 9)
|
|
136
131
|
typedef llvm::FunctionCallee FunctionCallee;
|
|
@@ -209,11 +209,6 @@ inline bool isNonInstricCallSite(const Instruction* inst)
|
|
|
209
209
|
return false;
|
|
210
210
|
return isCallSite(inst);
|
|
211
211
|
}
|
|
212
|
-
/// Whether an instruction is a return instruction
|
|
213
|
-
inline bool isReturn(const Instruction* inst)
|
|
214
|
-
{
|
|
215
|
-
return SVFUtil::isa<ReturnInst>(inst);
|
|
216
|
-
}
|
|
217
212
|
|
|
218
213
|
/// Return LLVM callsite given a instruction
|
|
219
214
|
inline CallSite getLLVMCallSite(const Instruction* inst)
|
|
Binary file
|
|
Binary file
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
#include "Util/SVFUtil.h"
|
|
35
|
+
#include "SVF-FE/LLVMUtil.h"
|
|
35
36
|
#include "MemoryModel/LocationSet.h"
|
|
36
37
|
#include "Util/SVFModule.h"
|
|
37
38
|
namespace SVF
|
|
@@ -163,8 +164,6 @@ public:
|
|
|
163
164
|
// @{
|
|
164
165
|
static bool isNullPtrSym(const Value *val);
|
|
165
166
|
|
|
166
|
-
static bool isBlackholeSym(const Value *val);
|
|
167
|
-
|
|
168
167
|
bool isConstantObjSym(const Value *val);
|
|
169
168
|
|
|
170
169
|
static inline bool isBlkPtr(NodeID id)
|
|
@@ -232,7 +231,7 @@ public:
|
|
|
232
231
|
|
|
233
232
|
if(isNullPtrSym(val))
|
|
234
233
|
return nullPtrSymID();
|
|
235
|
-
else if(isBlackholeSym(val))
|
|
234
|
+
else if (SVFUtil::isBlackholeSym(val))
|
|
236
235
|
return blkPtrSymID();
|
|
237
236
|
else
|
|
238
237
|
{
|
|
@@ -244,7 +243,7 @@ public:
|
|
|
244
243
|
|
|
245
244
|
inline bool hasValSym(const Value* val)
|
|
246
245
|
{
|
|
247
|
-
if (isNullPtrSym(val) || isBlackholeSym(val))
|
|
246
|
+
if (isNullPtrSym(val) || SVFUtil::isBlackholeSym(val))
|
|
248
247
|
return true;
|
|
249
248
|
else
|
|
250
249
|
return (valSymMap.find(val) != valSymMap.end());
|
|
@@ -27,10 +27,14 @@ typedef llvm::ConstantDataSequential ConstantDataSequential;
|
|
|
27
27
|
typedef llvm::ConstantExpr ConstantExpr;
|
|
28
28
|
|
|
29
29
|
// LLVM Instructions
|
|
30
|
+
typedef llvm::AllocaInst AllocaInst;
|
|
30
31
|
typedef llvm::AtomicCmpXchgInst AtomicCmpXchgInst;
|
|
31
32
|
typedef llvm::AtomicRMWInst AtomicRMWInst;
|
|
32
33
|
typedef llvm::BitCastInst BitCastInst;
|
|
34
|
+
typedef llvm::BranchInst BranchInst;
|
|
35
|
+
typedef llvm::SwitchInst SwitchInst;
|
|
33
36
|
typedef llvm::CallBrInst CallBrInst;
|
|
37
|
+
typedef llvm::ReturnInst ReturnInst;
|
|
34
38
|
typedef llvm::CastInst CastInst;
|
|
35
39
|
typedef llvm::CmpInst CmpInst;
|
|
36
40
|
typedef llvm::ExtractValueInst ExtractValueInst;
|
|
@@ -54,5 +58,6 @@ typedef llvm::VAEndInst VAEndInst;
|
|
|
54
58
|
typedef llvm::VAStartInst VAStartInst;
|
|
55
59
|
typedef llvm::BinaryOperator BinaryOperator;
|
|
56
60
|
typedef llvm::UnaryOperator UnaryOperator;
|
|
61
|
+
typedef llvm::UndefValue UndefValue;
|
|
57
62
|
|
|
58
63
|
#endif // SVF_FE_BASIC_TYPES_H
|
|
@@ -59,6 +59,13 @@ inline const Function* getLLVMFunction(const Value* val)
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
/// Check whether this value is a black hole
|
|
63
|
+
inline bool isBlackholeSym(const Value *val)
|
|
64
|
+
{
|
|
65
|
+
return (SVFUtil::isa<UndefValue>(val));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
62
69
|
/// Return true if the call is an external call (external library in function summary table)
|
|
63
70
|
/// If the libary function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call.
|
|
64
71
|
//@{
|
|
@@ -78,6 +85,12 @@ inline bool isExtCall(const Instruction *inst)
|
|
|
78
85
|
}
|
|
79
86
|
//@}
|
|
80
87
|
|
|
88
|
+
/// Whether an instruction is a return instruction
|
|
89
|
+
inline bool isReturn(const Instruction* inst)
|
|
90
|
+
{
|
|
91
|
+
return SVFUtil::isa<ReturnInst>(inst);
|
|
92
|
+
}
|
|
93
|
+
|
|
81
94
|
/// Return true if the call is a heap allocator/reallocator
|
|
82
95
|
//@{
|
|
83
96
|
/// note that these two functions are not suppose to be used externally
|
|
@@ -123,14 +123,9 @@ typedef llvm::MDNode MDNode;
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
/// LLVM Instructions
|
|
126
|
-
typedef llvm::AllocaInst AllocaInst;
|
|
127
126
|
typedef llvm::CallInst CallInst;
|
|
128
127
|
typedef llvm::StoreInst StoreInst;
|
|
129
128
|
typedef llvm::LoadInst LoadInst;
|
|
130
|
-
typedef llvm::ReturnInst ReturnInst;
|
|
131
|
-
typedef llvm::BranchInst BranchInst;
|
|
132
|
-
typedef llvm::SwitchInst SwitchInst;
|
|
133
|
-
typedef llvm::UndefValue UndefValue;
|
|
134
129
|
|
|
135
130
|
#if (LLVM_VERSION_MAJOR >= 9)
|
|
136
131
|
typedef llvm::FunctionCallee FunctionCallee;
|
|
@@ -209,11 +209,6 @@ inline bool isNonInstricCallSite(const Instruction* inst)
|
|
|
209
209
|
return false;
|
|
210
210
|
return isCallSite(inst);
|
|
211
211
|
}
|
|
212
|
-
/// Whether an instruction is a return instruction
|
|
213
|
-
inline bool isReturn(const Instruction* inst)
|
|
214
|
-
{
|
|
215
|
-
return SVFUtil::isa<ReturnInst>(inst);
|
|
216
|
-
}
|
|
217
212
|
|
|
218
213
|
/// Return LLVM callsite given a instruction
|
|
219
214
|
inline CallSite getLLVMCallSite(const Instruction* inst)
|