ahatanak added inline comments.
================ Comment at: clang/lib/CodeGen/CGObjC.cpp:1429 + GetAddrOfLocalVar(*setterMethod->param_begin()), ivar->getType()); + callCStructCopyAssignmentOperator(Dst, Src); + } else { ---------------- rjmccall wrote: > When the method takes the structure by value, we're passed an owned copy with > the responsibility to destroy it in the method, right? Is there a way for us > to do a destructive move-assignment here and suppress the normal destruction > of the parameter? We could check whether a function parameter is a setter parameter and avoid pushing the cleanup for it if it is. If you are thinking about a more general way of merging copy+destruction into a move, I think we need to take a different approach. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/ https://reviews.llvm.org/D131701 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits