[PATCH] D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 16 02:39:48 PDT 2018


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

Thank you.  Minor request and then LGTM.



================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2202
+    // __attribute__((destructor)) in a constructor function.
+    addr = llvm::Constant::getNullValue(CGF.Int8PtrTy);
+
----------------
You should probably mention that using null here is okay because this value is just passed back as an argument to the destructor function.


Repository:
  rC Clang

https://reviews.llvm.org/D45578





More information about the cfe-commits mailing list