[PATCH] Start adding support for dllimport/dllexport on classes (PR11170)
Hans Wennborg
hans at chromium.org
Thu May 29 16:01:50 PDT 2014
I tested my patch with Nico's tests from https://github.com/gix/clang/commit/ea6cb1d71c6ef8dac2afd5f40219de9460a92b3f, and fixed the two asserts we were hitting when exporting defaulted trivial constructors and destructors.
There were two remaining test failures: 1) we emit RTTI type descriptor, etc. as weak_odr instead of linkonce_odr when exporting the class. Not a big deal since we're exporting the vtable anyway, but I'm not sure why it's happening. 2) for the MinGW ABI, we don't export the vtable for ExportDynamicClass, but we should.
If folks think it's OK, it'd like to get this patch landed, let Nico commit his tests, and then continue addressing the issues above.
(I had to updated Nico's tests with 'nonnull' to make them work, see the commit here: https://github.com/zmodem/clang/commit/c62c92967e608a4ff90d18887b848122c6efbeb8)
http://reviews.llvm.org/D3877
Files:
include/clang/Basic/Attr.td
lib/CodeGen/CGCXX.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
test/CodeGenCXX/dllexport.cpp
test/CodeGenCXX/dllimport.cpp
test/SemaCXX/dllexport.cpp
test/SemaCXX/dllimport.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3877.9937.patch
Type: text/x-patch
Size: 25483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140529/c31371a5/attachment.bin>
More information about the cfe-commits
mailing list