Description
Commit e3f936e introduces a functional regression. If the constructor after operator new fails, and then operator delete is called, we run into the following assertion. This was caught by malfunction tests:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/User.cpp#L190
Reverting the removal of:
Obj->NumUserOperands = Us;
Obj->HasHungOffUses = false;
Obj->HasDescriptor = DescBytes != 0;
respecively
Obj->NumUserOperands = 0;
Obj->HasHungOffUses = true;
Obj->HasDescriptor = false;
helps.
I will prepare a patch for that.