For MS ABI, emit dllexport friend functions defined inline in class
authorStephan Bergmann <sbergman@redhat.com>
Wed, 30 Mar 2016 06:27:31 +0000 (06:27 +0000)
committerStephan Bergmann <sbergman@redhat.com>
Wed, 30 Mar 2016 06:27:31 +0000 (06:27 +0000)
commit17d7d145717cc9eedee5f9650f5188a0bf32a65f
tree86dbd32ddec472b67e9c6dc95c820643482a9ef5
parente9ff01b2a701713a82d09efab7649c11d0b4d1e6
For MS ABI, emit dllexport friend functions defined inline in class

...as that is apparently what MSVC does.  This is an updated version of r263738,
which had to be reverted in r263740 due to test failures.  The original version
had erroneously emitted functions that are defined in class templates, too (see
the updated "Handle friend functions" code in EmitDeferredDecls,
lib/CodeGen/ModuleBuilder.cpp).  (The updated tests needed to be split out into
their own dllexport-ms-friend.cpp because of the CHECK-NOTs which would have
interfered with subsequent CHECK-DAGs in dllexport.cpp.)

Differential Revision: http://reviews.llvm.org/D18430

llvm-svn: 264841
clang/include/clang/AST/ASTConsumer.h
clang/include/clang/Frontend/MultiplexConsumer.h
clang/include/clang/Sema/Sema.h
clang/lib/CodeGen/CodeGenAction.cpp
clang/lib/CodeGen/ModuleBuilder.cpp
clang/lib/Frontend/MultiplexConsumer.cpp
clang/lib/Parse/ParseCXXInlineMethods.cpp
clang/lib/Sema/SemaDecl.cpp
clang/test/CodeGenCXX/dllexport-ms-friend.cpp [new file with mode: 0644]