[PATCH] D71572: [ItaniumCXXABI] Make tls wrappers comdat on Windows

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 14:07:02 PST 2019


rnk added inline comments.


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2551
+  // actually handle multiple TUs defining the same wrapper.
+  if (CGM.getTriple().isOSWindows() && CGM.supportsCOMDAT() &&
+      Wrapper->isWeakForLinker())
----------------
IMO we should be doing the same thing on ELF, you can see the code pattern used elsewhere:
http://llvm-cs.pcc.me.uk/?q=setComdat

Before comdats were made explicit in the IR and we stopped implicitly making comdat groups for odr things on ELF, these wrappers would've been in a comdat group.


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

https://reviews.llvm.org/D71572





More information about the cfe-commits mailing list