svf-lib 1.0.1735 → 1.0.1737

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.
@@ -65,12 +65,13 @@ public:
65
65
  typedef std::vector<IdxOperandPair> IdxOperandPairs;
66
66
 
67
67
  /// Constructor
68
- AccessPath(APOffset o = 0) : fldIdx(o) {}
68
+ AccessPath(APOffset o = 0, const SVFType* srcTy = nullptr) : fldIdx(o), gepSourceElementType(srcTy) {}
69
69
 
70
70
  /// Copy Constructor
71
71
  AccessPath(const AccessPath& ap)
72
72
  : fldIdx(ap.fldIdx),
73
- idxOperandPairs(ap.getIdxOperandPairVec())
73
+ idxOperandPairs(ap.getIdxOperandPairVec()),
74
+ gepSourceElementType(ap.getGepSourceElementType())
74
75
  {
75
76
  }
76
77
 
@@ -84,12 +85,13 @@ public:
84
85
  {
85
86
  fldIdx = rhs.fldIdx;
86
87
  idxOperandPairs = rhs.getIdxOperandPairVec();
88
+ gepSourceElementType = rhs.gepSourceElementType;
87
89
  return *this;
88
90
  }
89
91
  inline bool operator==(const AccessPath& rhs) const
90
92
  {
91
93
  return this->fldIdx == rhs.fldIdx &&
92
- this->idxOperandPairs == rhs.idxOperandPairs;
94
+ this->idxOperandPairs == rhs.idxOperandPairs && this->gepSourceElementType == rhs.gepSourceElementType;
93
95
  }
94
96
  //@}
95
97
 
@@ -107,6 +109,10 @@ public:
107
109
  {
108
110
  return idxOperandPairs;
109
111
  }
112
+ inline const SVFType* getGepSourceElementType() const
113
+ {
114
+ return gepSourceElementType;
115
+ }
110
116
  //@}
111
117
 
112
118
  /**
@@ -167,6 +173,9 @@ private:
167
173
 
168
174
  APOffset fldIdx; ///< Accumulated Constant Offsets
169
175
  IdxOperandPairs idxOperandPairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>
176
+ const SVFType* gepSourceElementType; /// source element type in gep instruction,
177
+ /// e.g., %f1 = getelementptr inbounds %struct.MyStruct, %struct.MyStruct* %arrayidx, i32 0, i32 0
178
+ /// the source element type is %struct.MyStruct
170
179
  };
171
180
 
172
181
  } // End namespace SVF
@@ -61,12 +61,13 @@ public:
61
61
  typedef std::vector<IdxOperandPair> IdxOperandPairs;
62
62
 
63
63
  /// Constructor
64
- AccessPath(APOffset o = 0) : fldIdx(o) {}
64
+ AccessPath(APOffset o = 0, const SVFType* srcTy = nullptr) : fldIdx(o), gepSourceElementType(srcTy) {}
65
65
 
66
66
  /// Copy Constructor
67
67
  AccessPath(const AccessPath& ap)
68
68
  : fldIdx(ap.fldIdx),
69
- idxOperandPairs(ap.getIdxOperandPairVec())
69
+ idxOperandPairs(ap.getIdxOperandPairVec()),
70
+ gepSourceElementType(ap.getGepSourceElementType())
70
71
  {
71
72
  }
72
73
 
@@ -80,12 +81,13 @@ public:
80
81
  {
81
82
  fldIdx = rhs.fldIdx;
82
83
  idxOperandPairs = rhs.getIdxOperandPairVec();
84
+ gepSourceElementType = rhs.gepSourceElementType;
83
85
  return *this;
84
86
  }
85
87
  inline bool operator==(const AccessPath& rhs) const
86
88
  {
87
89
  return this->fldIdx == rhs.fldIdx &&
88
- this->idxOperandPairs == rhs.idxOperandPairs;
90
+ this->idxOperandPairs == rhs.idxOperandPairs && this->gepSourceElementType == rhs.gepSourceElementType;
89
91
  }
90
92
  //@}
91
93
 
@@ -103,6 +105,10 @@ public:
103
105
  {
104
106
  return idxOperandPairs;
105
107
  }
108
+ inline const SVFType* getGepSourceElementType() const
109
+ {
110
+ return gepSourceElementType;
111
+ }
106
112
  //@}
107
113
 
108
114
  /**
@@ -162,6 +168,9 @@ private:
162
168
 
163
169
  APOffset fldIdx; ///< Accumulated Constant Offsets
164
170
  IdxOperandPairs idxOperandPairs; ///< a vector of actual offset in the form of <SVF Var, iterator type>
171
+ const SVFType* gepSourceElementType; /// source element type in gep instruction,
172
+ /// e.g., %f1 = getelementptr inbounds %struct.MyStruct, %struct.MyStruct* %arrayidx, i32 0, i32 0
173
+ /// the source element type is %struct.MyStruct
165
174
  };
166
175
 
167
176
  } // End namespace SVF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1735",
3
+ "version": "1.0.1737",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {