This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Restrict explicit instantation definition dllexport
ClosedPublic

Authored by smeenai on Jan 11 2017, 5:49 PM.

Details

Summary

In the case where the template class itself is already dllexport, the
implicit instantiation will have already emitted all members. When we
check the explicit instantiation definition, the Specialization will
have inherited the dllexport attribute, so we'll attempt to emit all
members for a second time, which causes an assertion failure. Restrict
the exporting to when the dllexport attribute is newly introduced by
the explicit instantiation definition.

Fixes PR31608.

Event Timeline

smeenai updated this revision to Diff 84062.Jan 11 2017, 5:49 PM
smeenai retitled this revision from to [Sema] Restrict explicit instantation definition dllexport.
smeenai updated this object.
smeenai added reviewers: hans, rnk.
smeenai added subscribers: cfe-commits, steveire.
rnk accepted this revision.Jan 12 2017, 4:28 PM
rnk edited edge metadata.

lgtm, thanks for the fix!

This revision is now accepted and ready to land.Jan 12 2017, 4:28 PM
This revision was automatically updated to reflect the committed changes.