cooperp wrote:

> It's not clear to me whether we should do this only when NRVO is false.

Oh i didn't think about that one.  Certainly from the looks of the code in 
LLVM, we would generate a stack protector for large buffers used by NRVO.

I suspect we would want to allow this attribute in the NRVO case too, assuming 
that we can effectively trust/audit that writes to the given buffer are in 
range (maybe they are if the only one writing the buffer is compiler generated 
code not user written code?).

Either way, i don't have too strong an opinion.  @ahatanak what do you think? 
Could also punt NRVO until later if that helps?

https://github.com/llvm/llvm-project/pull/173311
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to