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

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 29 11:50:44 PST 2021


aganea added inline comments.


================
Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:2470
+    // Dynamic TLS initialization works by checking the state of a
+    // guard varibale (__tls_guard) to see whether TLS initialization
+    // for a thread has happend yet.
----------------
s/varibale/variable/


================
Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:2477
+
+  // Emit the variable just like any regular global variable
+
----------------
Missing period at the end of the sentence please.


================
Comment at: clang/test/CodeGenCXX/ms-thread_local.cpp:1
-// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s  -std=c++1y -triple=i686-pc-win32 -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD
+// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=1925 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=1925 -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD
----------------
Also please check with `-fms-compatibility-version=1920` to ensure that the dynamic initialization isn't generated.


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

https://reviews.llvm.org/D115456



More information about the cfe-commits mailing list