[llvm-dev] Error Calling eraseFromParent()

Ahmad Nouralizadeh via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 7 08:03:24 PDT 2018


Hi.
This is part of my code:
...
if (auto* op = dyn_cast<BinaryOperator>(&I)) {
   Value* lhs = op->getOperand(0);
   Value* rhs = op->getOperand(1);
   Value* mul = builder.CreateMul(lhs, rhs);

   for (auto& U : op->uses()) {
      User* user = U.getUser();
      user->setOperand(U.getOperandNo(), mul);
   }

   I.eraseFromParent();
}
...
This leads to the following runtime error:
LLVMSymbolizer: error reading file: No such file or directory
...
Does anybody know the solution?
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180807/a57704e6/attachment.html>


More information about the llvm-dev mailing list