svf-lib 1.0.1453 → 1.0.1455
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/svf/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-linux/svf/include/Graphs/ConsGEdge.h +1 -1
- package/SVF-linux/svf/include/MemoryModel/LocationSet.h +3 -3
- package/SVF-linux/svf/include/SVFIR/SVFStatements.h +2 -2
- package/SVF-linux/svf/include/SVFIR/SVFVariables.h +5 -5
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -92,7 +92,7 @@ public:
|
|
|
92
92
|
|
|
93
93
|
/// Get methods
|
|
94
94
|
//@{
|
|
95
|
-
inline s32_t
|
|
95
|
+
inline s32_t getConstantFieldIdx() const
|
|
96
96
|
{
|
|
97
97
|
return fldIdx;
|
|
98
98
|
}
|
|
@@ -107,7 +107,7 @@ public:
|
|
|
107
107
|
//@}
|
|
108
108
|
|
|
109
109
|
/// Return accumulated constant offset given OffsetVarVec
|
|
110
|
-
s32_t
|
|
110
|
+
s32_t computeConstantOffset() const;
|
|
111
111
|
|
|
112
112
|
/// Return element number of a type.
|
|
113
113
|
u32_t getElementNum(const SVFType* type) const;
|
|
@@ -147,7 +147,7 @@ template <> struct std::hash<SVF::LocationSet>
|
|
|
147
147
|
{
|
|
148
148
|
SVF::Hash<std::pair<SVF::NodeID, SVF::NodeID>> h;
|
|
149
149
|
std::hash<SVF::LocationSet::OffsetVarAndGepTypePairs> v;
|
|
150
|
-
return h(std::make_pair(ls.
|
|
150
|
+
return h(std::make_pair(ls.getConstantFieldIdx(), v(ls.getOffsetVarAndGepTypePairVec())));
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -456,13 +456,13 @@ public:
|
|
|
456
456
|
/// Return accumulated constant offset (when accessing array or struct) if this offset is a constant.
|
|
457
457
|
inline s32_t accumulateConstantOffset() const
|
|
458
458
|
{
|
|
459
|
-
return getLocationSet().
|
|
459
|
+
return getLocationSet().computeConstantOffset();
|
|
460
460
|
}
|
|
461
461
|
/// Field index of the gep statement if it access the field of a struct
|
|
462
462
|
inline s32_t getConstantFieldIdx() const
|
|
463
463
|
{
|
|
464
464
|
assert(isVariantFieldGep()==false && "Can't retrieve the LocationSet if using a variable field index (pointer arithmetic) for struct field access ");
|
|
465
|
-
return getLocationSet().
|
|
465
|
+
return getLocationSet().getConstantFieldIdx();
|
|
466
466
|
}
|
|
467
467
|
/// Gep statement with a variant field index (pointer arithmetic) for struct field access
|
|
468
468
|
inline bool isVariantFieldGep() const
|
|
@@ -399,7 +399,7 @@ public:
|
|
|
399
399
|
/// offset of the base value variable
|
|
400
400
|
inline s32_t getConstantFieldIdx() const
|
|
401
401
|
{
|
|
402
|
-
return ls.
|
|
402
|
+
return ls.getConstantFieldIdx();
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
/// Return name of a LLVM value
|
|
@@ -466,7 +466,7 @@ public:
|
|
|
466
466
|
/// offset of the mem object
|
|
467
467
|
inline s32_t getConstantFieldIdx() const
|
|
468
468
|
{
|
|
469
|
-
return ls.
|
|
469
|
+
return ls.getConstantFieldIdx();
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
/// Set the base object from which this GEP node came from.
|
|
@@ -484,15 +484,15 @@ public:
|
|
|
484
484
|
/// Return the type of this gep object
|
|
485
485
|
inline virtual const SVFType* getType() const
|
|
486
486
|
{
|
|
487
|
-
return SymbolTableInfo::SymbolInfo()->getFlatternedElemType(mem->getType(), ls.
|
|
487
|
+
return SymbolTableInfo::SymbolInfo()->getFlatternedElemType(mem->getType(), ls.getConstantFieldIdx());
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
/// Return name of a LLVM value
|
|
491
491
|
inline const std::string getValueName() const
|
|
492
492
|
{
|
|
493
493
|
if (value)
|
|
494
|
-
return value->getName() + "_" + std::to_string(ls.
|
|
495
|
-
return "offset_" + std::to_string(ls.
|
|
494
|
+
return value->getName() + "_" + std::to_string(ls.getConstantFieldIdx());
|
|
495
|
+
return "offset_" + std::to_string(ls.getConstantFieldIdx());
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
virtual const std::string toString() const;
|
|
Binary file
|
|
Binary file
|