[PATCH] Emit initializers for selectany globals in comdat-associative sections (PR20889)
Reid Kleckner
rnk at google.com
Tue Sep 9 20:22:50 PDT 2014
================
Comment at: lib/CodeGen/CGDeclCXX.cpp:335
@@ -334,1 +334,3 @@
DelayedCXXInitPosition.erase(D);
+ } else if (D->hasAttr<SelectAnyAttr>()) {
+ // SelectAny globals will be comdat-folded. Put the initializer into a COMDAT
----------------
Should we do the same for WeakAttr? What does GCC do?
I wonder if there is a more general GVA linkage check we should do. Can you add a test for static data members of implicitly instantiated dllexport class templates?
http://reviews.llvm.org/D5281
More information about the cfe-commits
mailing list