[PATCH] D63283: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 11:02:25 PDT 2019


rjmccall added inline comments.


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2370
+  if (CGM.getCodeGenOpts().CXAAtExit || D.getTLSKind())
     return emitGlobalDtorWithCXAAtExit(CGF, dtor, addr, D.getTLSKind());
 
----------------
It's fine to match the GCC behavior, and it's even somewhat explicable.  Could you update the comment to explain, first of all, that this path handles both `__cxa_atexit` and `__cxa_thread_atexit`, and secondly that the option is only meant to control the former?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63283/new/

https://reviews.llvm.org/D63283





More information about the cfe-commits mailing list