[PATCH] D19275: Do not register incompatible C++ destructors with __cxa_atexit
JF Bastien via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 14:55:14 PDT 2016
jfb added a comment.
lgtm besides two nits. Would be good to get a review from @t.p.northover or someone from ARM.
================
Comment at: lib/CodeGen/CGDeclCXX.cpp:95
@@ +94,3 @@
+ Record->getDestructor(), Dtor_Complete));
+ // If __cxa_atexit is disabled via a flag, a different helper function is
+ // generated elsewhere which uses atexit instead, and it takes the destructor
----------------
Connecting the dots between "the right signature" and "has this return" isn't obvious IMO.
================
Comment at: lib/CodeGen/CGDeclCXX.cpp:100
@@ +99,3 @@
+ if (Record &&
+ (CanRegisterDestructor || UsingExternalHelper)) {
+ assert(!Record->hasTrivialDestructor());
----------------
clang-format
http://reviews.llvm.org/D19275
More information about the cfe-commits
mailing list