Skip to content

Commit

Permalink
Merge pull request #1494 from liushengahn/Fix-Issue-1493
Browse files Browse the repository at this point in the history
fix issue 1493
  • Loading branch information
yuleisui authored Jun 25, 2024
2 parents c82e4e0 + 1248747 commit 369c052
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion svf-llvm/lib/ICFGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void ICFGBuilder::processFunBody(WorkList& worklist)

if (const BranchInst* br = SVFUtil::dyn_cast<BranchInst>(inst))
{
assert(branchID <= 2 && "if/else has more than two branches?");
assert(branchID <= 1 && "if/else has more than two branches?");
if(br->isConditional())
icfg->addConditionalIntraEdge(srcNode, dstNode, LLVMModuleSet::getLLVMModuleSet()->getSVFValue(br->getCondition()), 1 - branchID);
else
Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/lib/SVFIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ void SVFIRBuilder::visitBranchInst(BranchInst &inst)
u32_t branchID = 0;
for (const Instruction* succInst : nextInsts)
{
assert(branchID <= 2 && "if/else has more than two branches?");
assert(branchID <= 1 && "if/else has more than two branches?");
const SVFInstruction* svfSuccInst = LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(succInst);
const ICFGNode* icfgNode = pag->getICFG()->getICFGNode(svfSuccInst);
successors.push_back(std::make_pair(icfgNode, 1-branchID));
Expand Down

0 comments on commit 369c052

Please sign in to comment.