svf-lib 1.0.764 → 1.0.768

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.
@@ -417,17 +417,17 @@ public:
417
417
  }
418
418
 
419
419
  /// offset of the base value variable
420
- inline u32_t getOffset() const
420
+ inline u32_t getFieldOffset() const
421
421
  {
422
- return ls.accumulateConstantOffset();
422
+ return ls.accumulateConstantFieldIdx();
423
423
  }
424
424
 
425
425
  /// Return name of a LLVM value
426
426
  inline const std::string getValueName() const
427
427
  {
428
428
  if (value && value->hasName())
429
- return value->getName().str() + "_" + llvm::utostr(getOffset());
430
- return "offset_" + llvm::utostr(getOffset());
429
+ return value->getName().str() + "_" + llvm::utostr(getFieldOffset());
430
+ return "offset_" + llvm::utostr(getFieldOffset());
431
431
  }
432
432
 
433
433
  inline const Type* getType() const
@@ -492,9 +492,9 @@ public:
492
492
  }
493
493
 
494
494
  /// offset of the mem object
495
- inline u32_t getOffset() const
495
+ inline u32_t getFieldOffset() const
496
496
  {
497
- return ls.accumulateConstantOffset();
497
+ return ls.accumulateConstantFieldIdx();
498
498
  }
499
499
 
500
500
  /// Set the base object from which this GEP node came from.
@@ -512,15 +512,15 @@ public:
512
512
  /// Return the type of this gep object
513
513
  inline virtual const Type* getType() const
514
514
  {
515
- return SymbolTableInfo::SymbolInfo()->getOriginalFieldType(mem->getType(), ls.accumulateConstantOffset());
515
+ return SymbolTableInfo::SymbolInfo()->getOriginalFieldType(mem->getType(), ls.accumulateConstantFieldIdx());
516
516
  }
517
517
 
518
518
  /// Return name of a LLVM value
519
519
  inline const std::string getValueName() const
520
520
  {
521
521
  if (value && value->hasName())
522
- return value->getName().str() + "_" + llvm::itostr(ls.accumulateConstantOffset());
523
- return "offset_" + llvm::itostr(ls.accumulateConstantOffset());
522
+ return value->getName().str() + "_" + llvm::itostr(ls.accumulateConstantFieldIdx());
523
+ return "offset_" + llvm::itostr(ls.accumulateConstantFieldIdx());
524
524
  }
525
525
 
526
526
  virtual const std::string toString() const;
@@ -46,18 +46,18 @@ public:
46
46
  {
47
47
  }
48
48
 
49
- unsigned int getOffset(void) const
49
+ u32_t getFieldOffset(void) const
50
50
  {
51
51
  return offset;
52
52
  }
53
53
 
54
- void setOffset(unsigned int offset)
54
+ void setOffset(u32_t offset)
55
55
  {
56
56
  this->offset = offset;
57
57
  }
58
58
 
59
59
  private:
60
- unsigned int offset;
60
+ u32_t offset;
61
61
  };
62
62
 
63
63
  class DCHNode : public GenericNode<DCHNode, DCHEdge>
@@ -381,9 +381,9 @@ public:
381
381
  return edge;
382
382
  }
383
383
  /// Add Variant(Gep) edge
384
- inline VariantGepStmt* addVariantGepEdge(NodeID src, NodeID dst)
384
+ inline VariantGepStmt* addVariantGepEdge(NodeID src, NodeID dst, const LocationSet& ls)
385
385
  {
386
- VariantGepStmt *edge = pag->addVariantGepStmt(src, dst);
386
+ VariantGepStmt *edge = pag->addVariantGepStmt(src, dst, ls);
387
387
  setCurrentBBAndValueForPAGEdge(edge);
388
388
  return edge;
389
389
  }
@@ -64,7 +64,7 @@ private:
64
64
  void writePAGgepNode(SVF::NodeID nodeId, GepObjVar* gepNode)
65
65
  {
66
66
  auto baseNodeId = gepNode->getBaseNode();
67
- auto locationSetOffset = gepNode->getOffset();
67
+ auto locationSetOffset = gepNode->getFieldOffset();
68
68
 
69
69
  LLVMContext &context = mainModule->getContext();
70
70
  llvm::SmallVector<llvm::Metadata *, 32> operands;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.764",
3
+ "version": "1.0.768",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {