Skip to content

Commit 8a6f79a

Browse files
committed
fix(bcf): Issue of fla error
1 parent b6c9d5c commit 8a6f79a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm-project/llvm/lib/Passes/Obfuscation/Flattening.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ bool FlatteningPass::flatten(Function &F) {
9494
// 非条件跳转
9595
else if(BB->getTerminator()->getNumSuccessors() == 1){
9696
BasicBlock *sucBB = BB->getTerminator()->getSuccessor(0);
97-
if (bEntryBB_isConditional) {
98-
entryBB.getTerminator()->eraseFromParent();
99-
}
97+
// if (bEntryBB_isConditional) {
98+
// entryBB.getTerminator()->eraseFromParent();
99+
// }
100+
BB->getTerminator()->eraseFromParent(); // Fix fla issue
100101
ConstantInt *numCase = swInst->findCaseDest(sucBB);
101102
new StoreInst(numCase, swVarPtr, BB);
102103
BranchInst::Create(returnBB, BB);

0 commit comments

Comments
 (0)