erik.pilkington added a comment. I have a few nits, but I think this looks about right.
I reduced this testcase with creduce, can you use the minimized version? Also, I think it makes more sense to put the test into `test/CodeGenCXX` and verify the `-emit-llvm-only` output is correct with FileCheck. You can check out pretty much any test in that directory for an example of how to do this if you don't know already. class a { public: ~a(); }; class logger_base { a d; }; class e : logger_base {}; __attribute((no_destroy)) e g; ================ Comment at: lib/CodeGen/CGDeclCXX.cpp:72 + // attribute (D54344). + if (D.hasAttr<NoDestroyAttr>()) + return; ---------------- You should do this with `D.isNoDestroy(CGF.getContext())`, I suspect that this will still crash with `-fno-c++-static-destructors` without an attribute, and that function checks for the existence of that flag. Can you add a test for that too? https://reviews.llvm.org/D54344 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits