rjmccall added inline comments.

================
Comment at: clang/lib/CodeGen/CGObjC.cpp:1429
+          GetAddrOfLocalVar(*setterMethod->param_begin()), ivar->getType());
+      callCStructCopyAssignmentOperator(Dst, Src);
+    } else {
----------------
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?


================
Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-property.m:39
+// CHECK: call void @__copy_assignment_8_8_s0(ptr %[[ADD_PTR]], ptr 
%[[NONATOMIC]])
+// CHECK: call void @__destructor_8_s0(ptr %[[NONATOMIC]])
+
----------------
Yeah, this is the pattern which it would be great to avoid if we can.


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

Reply via email to