[PATCH] D104420: thread_local support for AIX

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 14 08:41:15 PDT 2021


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2971
+        isEmittedWithConstantInitializer(VD, true) &&
+        !VD->needsDestruction(getContext())) {
+      // Emit a weak global function referring to the initialization function.
----------------
Unfortunately `needsDestruction` cannot be counted on at this time for some incomplete types, see https://llvm.org/pr51079.


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2972-2975
+      // Emit a weak global function referring to the initialization function.
+      // This function will not exist if the TU defining the thread_local
+      // variable in question does not need any dynamic initialization for
+      // its thread_local variables.
----------------
This comment block is a copy/paste from above and is meant to describe a case where only a declaration of the init func is being emitted into the IR.


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

https://reviews.llvm.org/D104420



More information about the cfe-commits mailing list