We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6c9d5c commit 8a6f79aCopy full SHA for 8a6f79a
llvm-project/llvm/lib/Passes/Obfuscation/Flattening.cpp
@@ -94,9 +94,10 @@ bool FlatteningPass::flatten(Function &F) {
94
// 非条件跳转
95
else if(BB->getTerminator()->getNumSuccessors() == 1){
96
BasicBlock *sucBB = BB->getTerminator()->getSuccessor(0);
97
- if (bEntryBB_isConditional) {
98
- entryBB.getTerminator()->eraseFromParent();
99
- }
+ // if (bEntryBB_isConditional) {
+ // entryBB.getTerminator()->eraseFromParent();
+ // }
100
+ BB->getTerminator()->eraseFromParent(); // Fix fla issue
101
ConstantInt *numCase = swInst->findCaseDest(sucBB);
102
new StoreInst(numCase, swVarPtr, BB);
103
BranchInst::Create(returnBB, BB);
0 commit comments