[PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

Andrew V. Tischenko via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 11 03:59:41 PDT 2016


avt77 created this revision.
avt77 added a reviewer: rnk.
avt77 added a subscriber: cfe-commits.
avt77 changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".

If we have some function with dllimport attribute and then we have the function definition in the same module but without dllimport attribute we should add dllexport attribute to this function definition. The same should be done for variables. Example:

struct __declspec(dllimport) C3 {
   ~C3();
};

C3::~C3() {;} // we should export this definition

http://reviews.llvm.org/D18953

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  test/CodeGen/dllimport.c
  test/CodeGenCXX/dllimport-members.cpp
  test/CodeGenCXX/dllimport.cpp
  test/Sema/dllimport.c
  test/SemaCXX/dllimport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18953.53212.patch
Type: text/x-patch
Size: 35859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160411/b7e02c23/attachment-0001.bin>


More information about the cfe-commits mailing list