For now we do not set tls model for tls_guard with/without option -ftls-model which is suboptimal.
This patch set model from command line for tls_guard as well. This keeps same behavior with gcc.
TestPlan: check-clang
Paths
| Differential D81543
[CodeGen][TLS] Set TLS Model for __tls_guard as well. ClosedPublic Authored by junparser on Jun 10 2020, 2:03 AM.
Details Summary For now we do not set tls model for tls_guard with/without option -ftls-model which is suboptimal. TestPlan: check-clang
Diff Detail Event TimelineComment Actions Changes generally LGTM, but this is not my area of expertise.
Comment Actions @aaron.ballman thanks for the review. I have updated the patch.
This revision is now accepted and ready to land.Jun 16 2020, 5:18 AM Closed by commit rG4a1776979fd8: [CodeGen][TLS] Set TLS Model for __tls_guard as well. (authored by junparser). · Explain WhyJun 16 2020, 5:33 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 269761 clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/test/CodeGen/tls-model.cpp
|
Do we need a similar change in MicrosoftCXXABI::EmitGuardedInit()? I notice it sets thread local to true but does not set the thread local mode.