[PATCH] D115456: Implement on-demand TLS initialization for Microsoft CXX ABI

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 16 10:33:25 PST 2021


rnk added a comment.

I probably don't have time to review this, so let me redirect to @hans.



================
Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:2400
 
+static llvm::GlobalValue *getTlsGuardVar(CodeGenModule &CGM) {
+  llvm::Type *VTy = llvm::Type::getInt8Ty(CGM.getLLVMContext());
----------------
My understanding is that every DLL has exactly one `__tls_guard` variable. All TLS variables in a DLL are initialized as soon as a thread accesses one TLS variable for a DLL. Is that accurate? Can you add comments about the way this is intended to work here?


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

https://reviews.llvm.org/D115456



More information about the cfe-commits mailing list