On Thu, May 29, 2014 at 5:57 PM, Nico Rieck <[email protected]> wrote:
> On 29.05.2014 23:25, Richard Smith wrote: > > I find it a bit weird that we care in CodeGen whether a dllimport > function > > is marked as 'inline'. I would expect that either Sema should detect the > > attribute has no effect and discard it, or it should keep it (and in the > > latter case, CodeGen should respect it and not care whether the function > is > > marked 'inline'). Is there some reason that doesn't work? > > The first patch is bit backwards and unnecessarily complex. MSVC emits > non-imported specializations with ODR linkage. > > So a simpler way to deal with this would be to just do what this mail's > subject says and make such a specialization implictly inline which > resolves correctly to available_externally without doing anything > further. New patch attached. Whether this is correct or not depends on the answer to my other question, that you snipped from your reply: "what linkage would MSVC give to an explicit specialization of a function template under normal circumstances (no dllimport/dllexport attributes)? Does it treat them as mergeable, like an inline function, or as a strong definition?"
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
