ahatanak added a comment.

In D82513#2142596 <https://reviews.llvm.org/D82513#2142596>, @rjmccall wrote:

> This seems fine.  I do wonder if the "real" bug is that this ought to be 
> handled properly in EmitReturnFromThunk, but regardless, the fix seems 
> acceptable.


Since `EmitReturnFromThunk` is used only by `EmitCallAndReturnForThunk`, I 
think it's better to just avoid the copy in the first place. Perhaps we should 
teach `EmitReturnOfRValue` to handle aggregates with non-trivial copy or move 
assignments correctly, but it seems that it won't have any effect once we 
commit the changes in this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82513/new/

https://reviews.llvm.org/D82513



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to