svf-lib 1.0.1725 → 1.0.1727
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/SVFIR/SVFValue.h +13 -2
- package/SVF-linux/svf-llvm/include/SVF-LLVM/LLVMUtil.h +3 -0
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/SVFIR/SVFValue.h +13 -2
- package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +3 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -320,6 +320,7 @@ private:
|
|
|
320
320
|
std::vector<const SVFBasicBlock*> allBBs; /// all BasicBlocks of this function
|
|
321
321
|
std::vector<const SVFArgument*> allArgs; /// all formal arguments of this function
|
|
322
322
|
std::vector<std::string> annotations; /// annotations of this function
|
|
323
|
+
SVFBasicBlock *exitBlock; /// a 'single' basic block having no successors and containing return instruction in a function
|
|
323
324
|
|
|
324
325
|
protected:
|
|
325
326
|
///@{ attributes to be set only through Module builders e.g., LLVMModule
|
|
@@ -412,12 +413,17 @@ public:
|
|
|
412
413
|
return allBBs.front();
|
|
413
414
|
}
|
|
414
415
|
|
|
416
|
+
/// Carefully! when you call getExitBB, you need ensure the function has return instruction
|
|
417
|
+
/// more refer to: https://github.com/SVF-tools/SVF/pull/1262
|
|
415
418
|
inline const SVFBasicBlock* getExitBB() const
|
|
416
419
|
{
|
|
417
420
|
assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
|
|
418
|
-
return
|
|
421
|
+
assert((!isNotRet && exitBlock) && "ensure the function has a single basic block containing a return instruction!");
|
|
422
|
+
return exitBlock;
|
|
419
423
|
}
|
|
420
424
|
|
|
425
|
+
void setExitBlock(SVFBasicBlock *bb);
|
|
426
|
+
|
|
421
427
|
inline const SVFBasicBlock* front() const
|
|
422
428
|
{
|
|
423
429
|
return getEntryBlock();
|
|
@@ -425,7 +431,11 @@ public:
|
|
|
425
431
|
|
|
426
432
|
inline const SVFBasicBlock* back() const
|
|
427
433
|
{
|
|
428
|
-
|
|
434
|
+
assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
|
|
435
|
+
/// Carefully! 'back' is just the last basic block of function,
|
|
436
|
+
/// but not necessarily a exit basic block
|
|
437
|
+
/// more refer to: https://github.com/SVF-tools/SVF/pull/1262
|
|
438
|
+
return allBBs.back();
|
|
429
439
|
}
|
|
430
440
|
|
|
431
441
|
inline const_iterator begin() const
|
|
@@ -520,6 +530,7 @@ class SVFBasicBlock : public SVFValue
|
|
|
520
530
|
friend class SVFIRWriter;
|
|
521
531
|
friend class SVFIRReader;
|
|
522
532
|
friend class SVFIRBuilder;
|
|
533
|
+
friend class SVFFunction;
|
|
523
534
|
|
|
524
535
|
public:
|
|
525
536
|
typedef std::vector<const SVFInstruction*>::const_iterator const_iterator;
|
|
@@ -205,6 +205,9 @@ inline bool isArgOfUncalledFunction (const Value* val)
|
|
|
205
205
|
}
|
|
206
206
|
//@}
|
|
207
207
|
|
|
208
|
+
/// Return true if the function has a return instruction
|
|
209
|
+
bool basicBlockHasRetInst(const BasicBlock* bb);
|
|
210
|
+
|
|
208
211
|
/// Return true if the function has a return instruction reachable from function
|
|
209
212
|
/// entry
|
|
210
213
|
bool functionDoesNotRet(const Function* fun);
|
|
Binary file
|
|
Binary file
|
|
@@ -318,6 +318,7 @@ private:
|
|
|
318
318
|
std::vector<const SVFBasicBlock*> allBBs; /// all BasicBlocks of this function
|
|
319
319
|
std::vector<const SVFArgument*> allArgs; /// all formal arguments of this function
|
|
320
320
|
std::vector<std::string> annotations; /// annotations of this function
|
|
321
|
+
SVFBasicBlock *exitBlock; /// a 'single' basic block having no successors and containing return instruction in a function
|
|
321
322
|
|
|
322
323
|
protected:
|
|
323
324
|
///@{ attributes to be set only through Module builders e.g., LLVMModule
|
|
@@ -410,12 +411,17 @@ public:
|
|
|
410
411
|
return allBBs.front();
|
|
411
412
|
}
|
|
412
413
|
|
|
414
|
+
/// Carefully! when you call getExitBB, you need ensure the function has return instruction
|
|
415
|
+
/// more refer to: https://github.com/SVF-tools/SVF/pull/1262
|
|
413
416
|
inline const SVFBasicBlock* getExitBB() const
|
|
414
417
|
{
|
|
415
418
|
assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
|
|
416
|
-
return
|
|
419
|
+
assert((!isNotRet && exitBlock) && "ensure the function has a single basic block containing a return instruction!");
|
|
420
|
+
return exitBlock;
|
|
417
421
|
}
|
|
418
422
|
|
|
423
|
+
void setExitBlock(SVFBasicBlock *bb);
|
|
424
|
+
|
|
419
425
|
inline const SVFBasicBlock* front() const
|
|
420
426
|
{
|
|
421
427
|
return getEntryBlock();
|
|
@@ -423,7 +429,11 @@ public:
|
|
|
423
429
|
|
|
424
430
|
inline const SVFBasicBlock* back() const
|
|
425
431
|
{
|
|
426
|
-
|
|
432
|
+
assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
|
|
433
|
+
/// Carefully! 'back' is just the last basic block of function,
|
|
434
|
+
/// but not necessarily a exit basic block
|
|
435
|
+
/// more refer to: https://github.com/SVF-tools/SVF/pull/1262
|
|
436
|
+
return allBBs.back();
|
|
427
437
|
}
|
|
428
438
|
|
|
429
439
|
inline const_iterator begin() const
|
|
@@ -518,6 +528,7 @@ class SVFBasicBlock : public SVFValue
|
|
|
518
528
|
friend class SVFIRWriter;
|
|
519
529
|
friend class SVFIRReader;
|
|
520
530
|
friend class SVFIRBuilder;
|
|
531
|
+
friend class SVFFunction;
|
|
521
532
|
|
|
522
533
|
public:
|
|
523
534
|
typedef std::vector<const SVFInstruction*>::const_iterator const_iterator;
|
|
@@ -205,6 +205,9 @@ inline bool isArgOfUncalledFunction (const Value* val)
|
|
|
205
205
|
}
|
|
206
206
|
//@}
|
|
207
207
|
|
|
208
|
+
/// Return true if the function has a return instruction
|
|
209
|
+
bool basicBlockHasRetInst(const BasicBlock* bb);
|
|
210
|
+
|
|
208
211
|
/// Return true if the function has a return instruction reachable from function
|
|
209
212
|
/// entry
|
|
210
213
|
bool functionDoesNotRet(const Function* fun);
|