Skip to content

Commit 369c052

Browse files
authored
Merge pull request SVF-tools#1494 from liushengahn/Fix-Issue-1493
fix issue 1493
2 parents c82e4e0 + 1248747 commit 369c052

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

svf-llvm/lib/ICFGBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
122122

123123
if (const BranchInst* br = SVFUtil::dyn_cast<BranchInst>(inst))
124124
{
125-
assert(branchID <= 2 && "if/else has more than two branches?");
125+
assert(branchID <= 1 && "if/else has more than two branches?");
126126
if(br->isConditional())
127127
icfg->addConditionalIntraEdge(srcNode, dstNode, LLVMModuleSet::getLLVMModuleSet()->getSVFValue(br->getCondition()), 1 - branchID);
128128
else

svf-llvm/lib/SVFIRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ void SVFIRBuilder::visitBranchInst(BranchInst &inst)
939939
u32_t branchID = 0;
940940
for (const Instruction* succInst : nextInsts)
941941
{
942-
assert(branchID <= 2 && "if/else has more than two branches?");
942+
assert(branchID <= 1 && "if/else has more than two branches?");
943943
const SVFInstruction* svfSuccInst = LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(succInst);
944944
const ICFGNode* icfgNode = pag->getICFG()->getICFGNode(svfSuccInst);
945945
successors.push_back(std::make_pair(icfgNode, 1-branchID));

0 commit comments

Comments
 (0)