[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 3 10:23:20 PDT 2024
================
@@ -769,9 +777,10 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) {
CharUnits GuardAlign = CharUnits::One();
Guard->setAlignment(GuardAlign.getAsAlign());
GuardAddr = ConstantAddress(Guard, Int8Ty, GuardAlign);
+ IsTLS = Guard->isThreadLocal();
}
- CodeGenFunction(*this).GenerateCXXGlobalInitFunc(Fn, ModuleInits,
- GuardAddr);
+ CodeGenFunction(*this).GenerateCXXGlobalInitFunc(Fn, ModuleInits, GuardAddr,
+ IsTLS);
----------------
rjmccall wrote:
```suggestion
/*IsTLS*/ false);
```
https://github.com/llvm/llvm-project/pull/96633
More information about the cfe-commits
mailing list