[PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 5 12:23:23 PDT 2016


bcraig added inline comments.

================
Comment at: test/thread_local_destruction_order.pass.cpp:54
@@ +53,3 @@
+  std::thread{thread_fn}.join();
+
+  thread_local OrderChecker fn_thread_local{2};
----------------
tavianator wrote:
> bcraig wrote:
> > In the places where you can, validate that dtors actually are getting called.  This may be your only place where you can do that.
> > 
> > So something like 'assert(seq == 1)' here.
> Sounds good.  What I wanted to do was print some output in the destructors, and check for a certain expected output.  But I couldn't figure out how to do that with lit.
Normally, you would do that by piping the output to the llvm FileCheck utility.  My unconfirmed suspicion is that that approach will run into difficulties because of libcxx and libcxxabi specific setups.

I think just having the global object's dtor check is good enough for the final post condition though.  I'm not terribly worried about global dtors malfunctioning.


http://reviews.llvm.org/D21803





More information about the cfe-commits mailing list