rsmith added inline comments.
================ Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2522 + if (CGM.getTriple().isOSWindows()) + return llvm::GlobalValue::LinkOnceODRLinkage; return llvm::GlobalValue::WeakODRLinkage; ---------------- I think the thread wrapper should probably be `linkonce_odr` across all platforms, at least in all TUs that don't contain a definition of the variable. Every such TU is supposed to provide its own copy regardless, so making it non-discardable seems to serve no purpose. That said, I suspect this is only hiding the real problem (by discarding the symbol before it creates a link error), and you'd still get link errors if you have two TUs that both use the same thread-local variable and happen to not inline / discard their thread wrappers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71572/new/ https://reviews.llvm.org/D71572 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits