svf-lib 1.0.1695 → 1.0.1697

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.
@@ -266,7 +266,7 @@ public:
266
266
  bool added1 = edge->getDstNode()->addIncomingEdge(edge);
267
267
  bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
268
268
  assert(added1 && added2 && "edge not added??");
269
- return true;
269
+ return added1 && added2;
270
270
  }
271
271
 
272
272
  /// Add a CDG node
@@ -438,8 +438,7 @@ struct DOTGraphTraits<SVF::CDG *> : public DOTGraphTraits<SVF::PAG *>
438
438
  template<class EdgeIter>
439
439
  static std::string getEdgeAttributes(NodeType *, EdgeIter EI, SVF::CDG *)
440
440
  {
441
- SVF::CDGEdge *edge = *(EI.getCurrent());
442
- assert(edge && "No edge found!!");
441
+ assert(*(EI.getCurrent()) && "No edge found!!");
443
442
  return "style=solid";
444
443
  }
445
444
 
@@ -312,15 +312,13 @@ public:
312
312
  ///@{
313
313
  inline u32_t removeIncomingEdge(CFBasicBlockEdge *edge)
314
314
  {
315
- iterator it = InEdges.find(edge);
316
- assert(it != InEdges.end() && "can not find in edge in SVFG node");
315
+ assert(InEdges.find(edge) != InEdges.end() && "can not find in edge in SVFG node");
317
316
  return InEdges.erase(edge);
318
317
  }
319
318
 
320
319
  inline u32_t removeOutgoingEdge(CFBasicBlockEdge *edge)
321
320
  {
322
- iterator it = OutEdges.find(edge);
323
- assert(it != OutEdges.end() && "can not find out edge in SVFG node");
321
+ assert(OutEdges.find(edge) != OutEdges.end() && "can not find out edge in SVFG node");
324
322
  return OutEdges.erase(edge);
325
323
  }
326
324
  ///@}
@@ -457,7 +455,7 @@ public:
457
455
  bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
458
456
  assert(added1 && added2 && "edge not added??");
459
457
  _totalCFBasicBlockEdge++;
460
- return true;
458
+ return added1 && added2;
461
459
  }
462
460
 
463
461
  /// Add a ICFGNodeWrapper
@@ -263,7 +263,7 @@ public:
263
263
  bool added1 = edge->getDstNode()->addIncomingEdge(edge);
264
264
  bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
265
265
  assert(added1 && added2 && "edge not added??");
266
- return true;
266
+ return added1 && added2;
267
267
  }
268
268
 
269
269
  /// Add a CDG node
@@ -435,8 +435,7 @@ struct DOTGraphTraits<SVF::CDG *> : public DOTGraphTraits<SVF::PAG *>
435
435
  template<class EdgeIter>
436
436
  static std::string getEdgeAttributes(NodeType *, EdgeIter EI, SVF::CDG *)
437
437
  {
438
- SVF::CDGEdge *edge = *(EI.getCurrent());
439
- assert(edge && "No edge found!!");
438
+ assert(*(EI.getCurrent()) && "No edge found!!");
440
439
  return "style=solid";
441
440
  }
442
441
 
@@ -312,15 +312,13 @@ public:
312
312
  ///@{
313
313
  inline u32_t removeIncomingEdge(CFBasicBlockEdge *edge)
314
314
  {
315
- iterator it = InEdges.find(edge);
316
- assert(it != InEdges.end() && "can not find in edge in SVFG node");
315
+ assert(InEdges.find(edge) != InEdges.end() && "can not find in edge in SVFG node");
317
316
  return InEdges.erase(edge);
318
317
  }
319
318
 
320
319
  inline u32_t removeOutgoingEdge(CFBasicBlockEdge *edge)
321
320
  {
322
- iterator it = OutEdges.find(edge);
323
- assert(it != OutEdges.end() && "can not find out edge in SVFG node");
321
+ assert(OutEdges.find(edge) != OutEdges.end() && "can not find out edge in SVFG node");
324
322
  return OutEdges.erase(edge);
325
323
  }
326
324
  ///@}
@@ -455,7 +453,7 @@ public:
455
453
  bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
456
454
  assert(added1 && added2 && "edge not added??");
457
455
  _totalCFBasicBlockEdge++;
458
- return true;
456
+ return added1 && added2;
459
457
  }
460
458
 
461
459
  /// Add a ICFGNodeWrapper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1695",
3
+ "version": "1.0.1697",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {