search for: new_instr

Displaying 1 result from an estimated 1 matches for "new_instr".

Did you mean: new_inst
2014 Jun 26
2
[LLVMdev] eraseFromParent and stack dump
Hello, I am creating a new instruction and I want to replace the use of a specified instruction. This is the code I have written Instruction *new_instr = BinaryOperator::Create(Instruction::Sub, op1, op2, ""); b->getInstList().insertAfter(old_instr, new_instr); //b is the BasicBlock old_instr->replaceAllUsesWith(new_instr); old_instr->eraseFromParent(); When I print the basic block, I see that my instruction was inserted an...