Skip to content

Commit b210c14

Browse files
committed
fix(bcf): Issue that no matching function for call to 'DemoteRegToStack'
1 parent 031ef3b commit b210c14

File tree

1 file changed

+4
-2
lines changed
  • llvm-project/llvm/lib/Passes/Obfuscation

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ void llvm::fixStack(Function &F) {
210210
// Demote escaped instructions
211211
//NumRegsDemoted += WorkList.size();
212212
for (Instruction *I : WorkList)
213-
DemoteRegToStack(*I, false, AllocaInsertionPoint);
213+
// DemoteRegToStack(*I, false, AllocaInsertionPoint);
214+
DemoteRegToStack(*I, false, AllocaInsertionPoint->getIterator()); // Fix for llvm 19.0.0
214215

215216
WorkList.clear();
216217

@@ -222,7 +223,8 @@ void llvm::fixStack(Function &F) {
222223
// Demote phi nodes
223224
//NumPhisDemoted += WorkList.size();
224225
for (Instruction *I : WorkList)
225-
DemotePHIToStack(cast<PHINode>(I), AllocaInsertionPoint);
226+
// DemotePHIToStack(cast<PHINode>(I), AllocaInsertionPoint);
227+
DemotePHIToStack(cast<PHINode>(I), AllocaInsertionPoint->getIterator()); // Fix for llvm 19.0.0
226228
}
227229

228230
/**

0 commit comments

Comments
 (0)