r291877 - [Sema] Restrict explicit instantation definition dllexport

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 11:22:17 PST 2017

Merged in r291943.


On Thu, Jan 12, 2017 at 5:58 PM, Shoaib Meenai <smeenai at fb.com> wrote:
> Requesting a merge to the 4.0 branch. This is a pretty small change, and it
> fixes an assertion failure on Windows (see PR31608 for details).
> On 1/12/17, 5:28 PM, "cfe-commits on behalf of Shoaib Meenai via cfe-commits" <cfe-commits-bounces at lists.llvm.org on behalf of cfe-commits at lists.llvm.org> wrote:
>     Author: smeenai
>     Date: Thu Jan 12 19:28:34 2017
>     New Revision: 291877
>     URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D291877-26view-3Drev&d=DgIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=UFJ7c0vMtAjKBdgoPzfL-28zDS1KWJTBHGfq_xGDm1s&s=f_XKXZU8x-ZpL2CZ0EhN86GlPYk_1RLL5eWxv3GY-pw&e=
>     Log:
>     [Sema] Restrict explicit instantation definition dllexport
>     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.

More information about the cfe-commits mailing list