]> granicus.if.org Git - clang/commit
[Sema] Use MSVC inner class behavior on Itanium
authorShoaib Meenai <smeenai@fb.com>
Thu, 20 Apr 2017 01:11:42 +0000 (01:11 +0000)
committerShoaib Meenai <smeenai@fb.com>
Thu, 20 Apr 2017 01:11:42 +0000 (01:11 +0000)
commit98641f22328f8541a90a380ee2cfe6d61e106254
treebdb39c90884d75542855627b489e333f88a0e5b2
parent21173cb65e66b21689ddfdf391efd6450867dd5f
[Sema] Use MSVC inner class behavior on Itanium

Windows Itanium aims to use MSVC export and import semantics. Inner
class members shouldn't be exported on a dllexport explicit
instantiation definition of the outer class, and they shouldn't be
imported on a dllimport explicit instantiation declaration of the outer
class (instead a local copy should be emitted). We were doing the first
but not the second, and this mismatch can lead to link errors. Fix the
behavior and add tests for both.

Differential Revision: https://reviews.llvm.org/D32213

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300804 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiate.cpp
test/CodeGenCXX/windows-itanium-dllexport.cpp