================
@@ -1597,16 +1597,19 @@ void LoweringPreparePass::lowerGlobalOp(GlobalOp op) {
// a guard variable for them (since they cannot use the global guard), so
// we differentiate them that way.
- if (op.getDynTlsRefs()->getGuardName()) {
+ // Some TLS globals (e.g. internal-linkage lifetime-extended reference
+ // temporaries) have no wrapper at all, so there are no dyn_tls_refs to
+ // associate them with. They still need to participate in the ordered
+ // __tls_init flow, but no wrapper alias is required.
+ if (op.getDynTlsRefs() && op.getDynTlsRefs()->getGuardName()) {
----------------
erichkeane wrote:
oh wait, are these checks still needed? Since these special DynTlsRefs only
exist if there is a ctor/dtor, we should keep the rules of "if you have a ctor
and are TLS, you NEED the DynTlsREfs.
I think you can revert this whole file.
https://github.com/llvm/llvm-project/pull/200227
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits