efriedma-quic wrote:

To ensure we don't destroy objects that weren't constructed, you can use a 
guard variable of some sort, sure.  I'm not quite sure what the goal is, here; 
are you trying to improve performance, or are you worried about the function 
pointers for security?

>>Also, I'm not sure objects are destroyed in the correct order.

>Do you mean for the test case I added? I think they should be destroyed in 
>reverse order.

No, I mean for objects in different translation units.  I think the same 
translation unit works like you think.  And different translation units maybe 
works for non-inline variables, assuming the loader iterates in the right 
direction?

I think you might run into issues with inline variables?  Not sure if this 
patch actually changes behavior for them.

https://github.com/llvm/llvm-project/pull/115788
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to