svf-lib 1.0.1041 → 1.0.1044

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.
@@ -88,6 +88,8 @@ private:
88
88
  IDToMemMapTy objMap; ///< map a memory sym id to its obj
89
89
 
90
90
  CallSiteSet callSiteSet;
91
+ Set<const Value*> nullPtrSyms;
92
+ Set<const Value*> blackholeSyms;
91
93
 
92
94
  // Singleton pattern here to enable instance of SymbolTableInfo can only be created once.
93
95
  static SymbolTableInfo* symInfo;
@@ -162,8 +164,7 @@ public:
162
164
  /// special value
163
165
  // @{
164
166
  static bool isNullPtrSym(const Value *val);
165
-
166
- bool isConstantObjSym(const Value *val);
167
+ static bool isBlackholeSym(const Value *val);
167
168
 
168
169
  static inline bool isBlkPtr(NodeID id)
169
170
  {
@@ -44,15 +44,25 @@ namespace SVFUtil
44
44
  {
45
45
 
46
46
 
47
-
48
-
49
47
  /// Check whether this value is a black hole
50
48
  inline bool isBlackholeSym(const Value *val)
51
49
  {
52
50
  return (SVFUtil::isa<UndefValue>(val));
53
51
  }
54
52
 
55
- //@}
53
+ /// Check whether this value is a black hole
54
+ inline bool isNullPtrSym(const Value *val)
55
+ {
56
+ if (const Constant* v = SVFUtil::dyn_cast<Constant>(val))
57
+ {
58
+ return v->isNullValue() && v->getType()->isPointerTy();
59
+ }
60
+ return false;
61
+ }
62
+
63
+ /// Check whether this value points-to a constant object
64
+ bool isConstantObjSym(const Value *val);
65
+
56
66
 
57
67
  /// Whether an instruction is a return instruction
58
68
  inline bool isReturn(const Instruction* inst)
@@ -56,6 +56,8 @@ public:
56
56
 
57
57
  /// collect the syms
58
58
  //@{
59
+ void collectNullPtrBlackholeSyms(const Value *val);
60
+
59
61
  void collectSym(const Value *val);
60
62
 
61
63
  void collectVal(const Value *val);
Binary file
@@ -56,6 +56,8 @@ public:
56
56
 
57
57
  /// collect the syms
58
58
  //@{
59
+ void collectNullPtrBlackholeSyms(const Value *val);
60
+
59
61
  void collectSym(const Value *val);
60
62
 
61
63
  void collectVal(const Value *val);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1041",
3
+ "version": "1.0.1044",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {