[PATCH] Allow dllimport/dllexport on inline functions and get the linkage right
Reid Kleckner
rnk at google.com
Wed May 14 16:17:16 PDT 2014
================
Comment at: lib/CodeGen/CodeGenModule.cpp:2002-2006
@@ -1999,6 +2001,7 @@
// If required by the ABI, give definitions of static data members with inline
// initializers at least linkonce_odr linkage.
if (getCXXABI().isInlineInitializedStaticDataMemberLinkOnce() &&
isa<VarDecl>(D) &&
isVarDeclInlineInitializedStaticDataMember(cast<VarDecl>(D)))
+ return DiscardableODRLinkage;
----------------
Hm, I think I wrote this. I probably should have pushed this up into ASTContext::GetGVALinkageForVariable() to make it return GVA_StrongODR.
http://reviews.llvm.org/D3772
More information about the cfe-commits
mailing list